Use "EXIT" instead of "exit" in bash trap statements
authorEric Biggers <ebiggers3@gmail.com>
Sat, 30 May 2015 20:47:58 +0000 (15:47 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 30 May 2015 20:47:58 +0000 (15:47 -0500)
The lower case version does not work in a Turkish locale.  The upper case
version is what the bash docs actually mention and is what bash actually
checks against using strcasecmp().

programs/mkwinpeimg.in
tests/test-imagex-update_and_extract

index ea0396ebc91952a56281e96fde162ef42936c3eb..f95e8e96090b47bdcefffaa77f2d3b807b7831e4 100755 (executable)
@@ -528,7 +528,7 @@ if [ -n "$start_script" -o -n "$overlay" -o -n "$remove_setup" ]; then
        modify_wim=yes
 fi
 check_needed_programs
-trap cleanup exit
+trap cleanup EXIT
 
 if [ $make != wim ]; then
        mkdir -p "$tmp_dir"/{boot,sources}
index 745c98f6a7196c508a9b37baf6e80e8adf5c9435..f7b8ce2a5d346034bfec7e27b9e313dd1b9779a8 100755 (executable)
@@ -24,7 +24,7 @@ fail() {
        msg "TEST FAILED (See above)"
 }
 
-trap fail exit
+trap fail EXIT
 
 prepare_empty_wim() {
        rm -rf in.dir
@@ -285,7 +285,7 @@ WIMLIB_IMAGEX_IGNORE_CASE=1 wimextract test.wim 1 @pathlist --dest-dir=out.dir -
 echo "**********************************************************"
 echo "          wimupdate/extract tests passed              "
 echo "**********************************************************"
-trap exit
+trap EXIT
 
 cd ..
 default_cleanup