aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/check_upstream.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/check_upstream.sh')
-rwxr-xr-xscripts/check_upstream.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/scripts/check_upstream.sh b/scripts/check_upstream.sh
deleted file mode 100755
index 9f20037..0000000
--- a/scripts/check_upstream.sh
+++ /dev/null
@@ -1,27 +0,0 @@
1#! /bin/bash
2
3# This script is for repo forked from others
4# check $1(repo) if upstream branch origin/master is
5# ahead of local branch $2(default to dev)
6
7
8if [ ! -d $1 ]; then
9 return 0
10fi
11
12head='dev'
13if [ $# -eq 2 ]
14then
15 head=$2
16fi
17
18cd $1
19git fetch origin && \
20git rev-list $head | grep $(git rev-parse origin/master) > /dev/null
21
22if [ $? -ne 0 ]
23then
24 echo "New commit at" $1
25fi
26
27echo $(date) check $1 >> $SETTING_DIR/log