summaryrefslogtreecommitdiff
path: root/contrib/check_GNU_style.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2012-10-02 07:41:28 +0000
committerChristophe Lyon <clyon@gcc.gnu.org>2012-10-02 09:41:28 +0200
commitc8ae7abfab787ea99556e69aa16780dbb81cec64 (patch)
tree5e706d68bafafbdcd98c5a992758b342edc1afa3 /contrib/check_GNU_style.sh
parente9453c6a3f7dee2e2efb5553b25a1a18ecb6edae (diff)
check_GNU_style.sh: Remove temporay file upon exit.
2012-10-02 Christophe Lyon <christophe.lyon@linaro.org> * check_GNU_style.sh: Remove temporay file upon exit. From-SVN: r191954
Diffstat (limited to 'contrib/check_GNU_style.sh')
-rwxr-xr-xcontrib/check_GNU_style.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index 8fb579fd160..b7f1c9d9378 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -37,6 +37,10 @@ test $# -eq 0 && usage
tmp=check_GNU_style.tmp
+# Remove $tmp on exit and various signals.
+trap "rm -f $tmp" 0
+trap "rm -f $tmp ; exit 1" 1 2 3 5 9 13 15
+
# Grep
g (){
msg="$1"