New helper script
authorSteve McIntyre <steve@einval.com>
Thu, 20 Dec 2018 15:49:42 +0000 (15:49 +0000)
committerSteve McIntyre <steve@einval.com>
Thu, 20 Dec 2018 15:49:42 +0000 (15:49 +0000)
Tage a source package as already removed from unstable, based on the
logfile we already have.

bin/note_removed [new file with mode: 0755]

diff --git a/bin/note_removed b/bin/note_removed
new file mode 100755 (executable)
index 0000000..70bcc88
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+for LOGFILE in $@; do
+    case $LOGFILE in
+       *.log)
+           # OK
+       ;;
+       *)
+           echo "ERROR: non-logfile $LOGFILE specified"
+           echo "ABORT"
+           exit 1
+           ;;
+    esac
+
+    if [ -f $LOGFILE ]; then
+       NOTEFILE=$(echo $LOGFILE | sed 's/\.log$/.note/')
+       echo "Already removed from unstable" > $NOTEFILE
+    else
+       echo "Can't find logfile $LOGFILE, ignoring"
+    fi
+done
+