comparison hgeditor @ 11190:43337076ba92

Fixed a bashism with trap numbers in hgeditor. When using trap in a shell script, it's more portable to use signal names, instead of numbers. Signal names (INT, KILL,...) are defined in POSIX, whereas its corresponding numbers aren't.
author Javi Merino <cibervicho@gmail.com>
date Tue, 11 May 2010 12:06:30 +0200
parents b5bbfa18daf7
children 2b440bb8a66b
comparison
equal deleted inserted replaced
11189:3ef2572de32f 11190:43337076ba92
23 rm -rf "$HGTMP" 23 rm -rf "$HGTMP"
24 } 24 }
25 25
26 # Remove temporary files even if we get interrupted 26 # Remove temporary files even if we get interrupted
27 trap "cleanup_exit" 0 # normal exit 27 trap "cleanup_exit" 0 # normal exit
28 trap "exit 255" 1 2 3 6 15 # HUP INT QUIT ABRT TERM 28 trap "exit 255" HUP INT QUIT ABRT TERM
29 29
30 HGTMP="${TMPDIR-/tmp}/hgeditor.$RANDOM.$RANDOM.$RANDOM.$$" 30 HGTMP="${TMPDIR-/tmp}/hgeditor.$RANDOM.$RANDOM.$RANDOM.$$"
31 (umask 077 && mkdir "$HGTMP") || { 31 (umask 077 && mkdir "$HGTMP") || {
32 echo "Could not create temporary directory! Exiting." 1>&2 32 echo "Could not create temporary directory! Exiting." 1>&2
33 exit 1 33 exit 1