diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh index 5d2a116aa..413083b48 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,16 +1,27 @@ #!/bin/sh # "autoreconf -f" will clobber our INSTALL file with a generic one if we -# don't move it out of the way +# don't move it out of the way. +# EXIT and signals that correspond to SIGHUP, SIGINT, SIGQUIT and SIGTERM. +signals="0 1 2 3 15" + +cleanup() +{ + trap '' $signals + if [ -f INSTALL.$$.tmp ]; then + echo "$0: restoring the INSTALL file" >&2 + mv -f INSTALL.$$.tmp INSTALL + fi +} + +rm -f INSTALL.$$.tmp +trap cleanup $signals mv -f INSTALL INSTALL.$$.tmp autoreconf -v -f -i -W all status=$? -rm -f INSTALL -mv -f INSTALL.$$.tmp INSTALL - rm -rf autom4te.cache exit $status |