summaryrefslogtreecommitdiff
path: root/make-dist
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-10-12 00:44:12 -0700
committerGlenn Morris <rgm@gnu.org>2010-10-12 00:44:12 -0700
commit5c845a010794f41f99d3e8d747173b8f128582a1 (patch)
treeb2b93926cf086d9f26078c5b97ed2762809d5c26 /make-dist
parent6f3ed07fed6c7434e77e8800ba834d2f4c23da08 (diff)
downloademacs-5c845a010794f41f99d3e8d747173b8f128582a1.tar.gz
* make-dist: Simplify trap handling.
Diffstat (limited to 'make-dist')
-rwxr-xr-xmake-dist7
1 files changed, 2 insertions, 5 deletions
diff --git a/make-dist b/make-dist
index 6da5502a3d8..12784060a0d 100755
--- a/make-dist
+++ b/make-dist
@@ -299,7 +299,7 @@ tempdir="${tempparent}/${emacsname}"
### This trap ensures that the staging directory will be cleaned up even
### when the script is interrupted in mid-career.
if [ "${clean_up}" = yes ]; then
- trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
+ trap "echo 'Cleaning up the staging directory'; rm -rf ${tempparent}" EXIT
fi
echo "Creating top directory: \`${tempdir}'"
@@ -571,10 +571,7 @@ if [ "${make_tar}" = yes ]; then
> ${emacsname}.tar${gzip_extension}
fi
-if [ "${clean_up}" = yes ]; then
- echo "Cleaning up the staging directory"
- rm -rf ${tempparent}
-else
+if [ "${clean_up}" != yes ]; then
(cd ${tempparent}; mv ${emacsname} ..)
rm -rf ${tempparent}
fi