]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
Use a function for cleanup at exit
authorroot <root@localhost>
Thu, 13 Dec 2012 17:02:14 +0000 (21:02 +0400)
committerroot <root@localhost>
Thu, 13 Dec 2012 17:02:14 +0000 (21:02 +0400)
git-remote-gcrypt

index 3db71d588c97d95453a2d55772d6034a51fddf9b..b22503d49dfbde6d5b7bb50f5aade605d9c77e50 100755 (executable)
@@ -761,12 +761,17 @@ EOF
        echo_git 
 }
 
+cleanup_atexit()
+{
+       rm -f "$Localdir"/tmp_*".$$" >&2
+}
+
 NAME=$1  # Remote name
 URL=$2   # Remote URL
 
 mkdir -p "$Localdir"
+trap cleanup_atexit EXIT 1 2 3 15
 
-trap 'rm -f "$Localdir/tmp_"*".$$"' EXIT 1 2 3 15
 echo_info "Development version -- Repository format MAY CHANGE"
 
 while read Input