A couple of handy scripts.
[dcpomatic.git] / hacks / apply_to_port
diff --git a/hacks/apply_to_port b/hacks/apply_to_port
new file mode 100755 (executable)
index 0000000..439ab91
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ "$1" == "" ]; then
+  echo "Syntax: $0 commit-message"
+  exit 1
+fi
+
+commit=`head -n 1 TO_PORT`
+msg="$commit from master; $*"
+echo $msg
+
+read -p "Commit? " -n 1 -r
+echo
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+    sed -i '1d' TO_PORT
+    git commit -a -m "$msg"
+fi
\ No newline at end of file