summaryrefslogtreecommitdiff
path: root/hacks/apply_to_port
blob: 439ab9154320c1b264f3c8803cab208f0b3aef6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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