]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
Get rid of lots of repetitions calling stage
[dak.git] / config / debian / dinstall.functions
index 6524d12b9208c43f59922f689803367ed783407d..549431167d535524d9f24e06e754b0f5f4157324 100644 (file)
@@ -19,6 +19,17 @@ function remove_all_locks() {
     rm -f $LOCK_DAILY $LOCK_ACCEPTED
 }
 
+function remove_locks {
+    remove_all_locks
+    trap - EXIT TERM HUP INT QUIT
+    ts "locked part finished"
+}
+
+function lockaccepted {
+    lockfile "$LOCK_ACCEPTED"
+    trap remove_all_locks EXIT TERM HUP INT QUIT
+}
+
 # If we error out this one is called, *FOLLOWED* by cleanup above
 function onerror() {
     ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")