index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-10-13 17:23:19 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-13 11:20:03 -0500 |
commit | d4c97ea2f64cafd3e14e2817d2b805f0b0d541f1 (patch) | |
tree | 4639bea0a033e8351fb575053a25060740efbd05 /scripts | |
parent | 12642a299b9f4218f43ce8a4f1d9924cfae744ee (diff) |
-rw-r--r-- | scripts/repo-add.sh.in | 10 |
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 29b150c8..d147b875 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -520,13 +520,19 @@ remove() { } trap_exit() { + # unhook all traps to avoid race conditions + trap '' EXIT TERM HUP QUIT INT ERR + echo error "$@" - exit 1 + clean_up 1 } clean_up() { - local exit_code=$? + local exit_code=${1:-$?} + + # unhook all traps to avoid race conditions + trap '' EXIT TERM HUP QUIT INT ERR [[ -d $tmpdir ]] && rm -rf "$tmpdir" (( CLEAN_LOCK )) && [[ -f $LOCKFILE ]] && rm -f "$LOCKFILE" |