Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / contrib / check_GNU_style.sh
index 8fb579f..ef8fdda 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Checks some of the GNU style formatting rules in a set of patches.
-# Copyright (C) 2010  Free Software Foundation, Inc.
+# Copyright (C) 2010, 2012  Free Software Foundation, Inc.
 # Contributed by Sebastian Pop <sebastian.pop@amd.com>
 
 # This program is free software; you can redistribute it and/or modify
@@ -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"