summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-07-21 18:39:48 -0400
committerAaron Griffin <aaronmgriffin@gmail.com>2009-07-21 18:39:48 -0400
commitfc49cf28729722a2e617f3347f70c542f834d82d (patch)
treea98a503cb6488f3790ffc94f202f26b5256c2433
parent868df42ab97baecb7032fc576f3595dfc02674c5 (diff)
db-update: Fix final repo_unlock
Because we lock/unlock in a loop, simply remove the cleanup trap at the end of the process, and manually clean up the work dir Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-update4
1 files changed, 2 insertions, 2 deletions
diff --git a/db-update b/db-update
index 338fb5b..525c21e 100755
--- a/db-update
+++ b/db-update
@@ -46,7 +46,6 @@ fi
cleanup() {
trap '' 0 2
- # unlock
repo_unlock $reponame $current_arch
rm -rf "$WORKDIR"
[ "$1" ] && exit $1
@@ -54,7 +53,7 @@ cleanup() {
ctrl_c() {
echo "Interrupted" >&2
- cleanup 0
+ cleanup 1
}
die() {
@@ -233,5 +232,6 @@ if [ -n "$to_add_any" ]; then
/bin/rm $to_add_any
fi
+trap '' 0 2
rm -rf $WORKDIR
# vim: set ts=4 sw=4 noet ft=sh: