diff autogen.sh @ 28830:47c988cae716

added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
author Gary Kramlich <grim@reaperworld.com>
date Tue, 27 Oct 2009 23:36:28 +0000
parents a709dc0bb3f3
children 889f74073af6
line wrap: on
line diff
--- a/autogen.sh	Tue Oct 27 07:58:50 2009 +0000
+++ b/autogen.sh	Tue Oct 27 23:36:28 2009 +0000
@@ -99,9 +99,17 @@
 	fi
 }
 
+cleanup () {
+	rm -f autogen-??????
+	echo
+	exit 2
+}
+
 ###############################################################################
 # We really start here, yes, very sneaky!
 ###############################################################################
+trap cleanup 2
+
 FIGLET=`which figlet 2> /dev/null`
 if [ x"${FIGLET}" != x"" ] ; then
 	${FIGLET} -f small ${PACKAGE}