A couple of handy scripts.
authorCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 22:00:22 +0000 (23:00 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 22:00:22 +0000 (23:00 +0100)
hacks/apply_to_port [new file with mode: 0755]
hacks/next_to_port [new file with mode: 0755]

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
diff --git a/hacks/next_to_port b/hacks/next_to_port
new file mode 100755 (executable)
index 0000000..1b51e0e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+head -n 1 TO_PORT | xargs git show