From 0cf78dc64079ae17571db985b9087073ce88073c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 9 May 2015 23:00:22 +0100 Subject: A couple of handy scripts. --- hacks/apply_to_port | 18 ++++++++++++++++++ hacks/next_to_port | 3 +++ 2 files changed, 21 insertions(+) create mode 100755 hacks/apply_to_port create mode 100755 hacks/next_to_port diff --git a/hacks/apply_to_port b/hacks/apply_to_port new file mode 100755 index 000000000..439ab9154 --- /dev/null +++ b/hacks/apply_to_port @@ -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 index 000000000..1b51e0ee1 --- /dev/null +++ b/hacks/next_to_port @@ -0,0 +1,3 @@ +#!/bin/bash + +head -n 1 TO_PORT | xargs git show -- cgit v1.2.3