Changeset - 3eca26ecefcc
[Not reviewed]
default
0 1 0
Dennis Fink (metalgamer) - 5 years ago 2015-08-20 02:03:04
dennis.fink@c3l.lu
Quote trap commands
1 file changed with 2 insertions and 2 deletions:
yaah
2
2
0 comments (0 inline, 0 general)
yaah
Show inline comments
...
 
@@ -358,7 +358,7 @@ extract_and_remove () {
 
        tar xzf "$1" -C "$downloaddir"
 

	
 
        msg_verbose2 "Setting trap to remove extracted directory"
 
        trap "rm -rf '$downloaddir/${1%.tar.gz}'" EXIT
 
        trap 'rm -rf "$downloaddir/${1%.tar.gz}"' EXIT
 

	
 
        msg_verbose1 "Removing '$1'"
 
        rm "$1"
...
 
@@ -391,7 +391,7 @@ download () {
 

	
 
        if [[ $? -eq 0 ]]; then
 
            msg_verbose2 "Setting trap to remove downloaded file"
 
            trap "rm -f '$downloaddir/$filename'" EXIT
 
            trap 'rm -f "$downloaddir/$filename"' EXIT
 
            extract_and_remove "$downloaddir/$filename"
 
        else
 
            error "'$1' could not be found!"
0 comments (0 inline, 0 general)