diff options
author | root <root@localhost> | 2012-12-13 21:02:14 +0400 |
---|---|---|
committer | root <root@localhost> | 2012-12-13 21:02:14 +0400 |
commit | fc191d5b3c170d976c32de84fef56743970219cd (patch) | |
tree | 934c6b783bf94c81354d9948ca2db083c4354aea | |
parent | d85190ef5117971712e233be4634e18197a3d116 (diff) | |
download | git-remote-gcrypt-fc191d5b3c170d976c32de84fef56743970219cd.zip git-remote-gcrypt-fc191d5b3c170d976c32de84fef56743970219cd.tar.gz git-remote-gcrypt-fc191d5b3c170d976c32de84fef56743970219cd.tar.bz2 |
Use a function for cleanup at exit
-rwxr-xr-x | git-remote-gcrypt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 3db71d5..b22503d 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -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 |