# HG changeset patch # User Glenn Morris # Date 1286869452 25200 # Node ID aa38b4aad8565ea51574c2112d40dd4b734e6358 # Parent a2f817d28d0884c3173ff74fec8051946f39b13b * make-dist: Simplify trap handling. diff -r a2f817d28d08 -r aa38b4aad856 make-dist --- a/make-dist Tue Oct 12 00:31:58 2010 -0700 +++ b/make-dist Tue Oct 12 00:44:12 2010 -0700 @@ -299,7 +299,7 @@ ### 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 @@ > ${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