aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/check_upstream
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-02-27 16:32:37 +0800
committertypebrook <typebrook@gmail.com>2020-02-27 16:32:37 +0800
commit00b136155183ae522ca458e540a8cf29bf525e74 (patch)
treec6e9d20d5021c95afc7149456d57eb435d808150 /scripts/check_upstream
parent3fa79eb14a4c0244fb2dc4a5b805b7cffaa63770 (diff)
update
Diffstat (limited to 'scripts/check_upstream')
-rwxr-xr-xscripts/check_upstream25
1 files changed, 0 insertions, 25 deletions
diff --git a/scripts/check_upstream b/scripts/check_upstream
deleted file mode 100755
index 3313e5b..0000000
--- a/scripts/check_upstream
+++ /dev/null
@@ -1,25 +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
7if [ ! -d "$1" ]; then
8 return 0
9fi
10
11head='dev'
12if [ $# -eq 2 ]
13then
14 head=$2
15fi
16
17cd "$1" && \
18git fetch origin && \
19if ! git rev-list "$head" | grep "$(git rev-parse origin/master)" > /dev/null
20then
21 [[ $(git pull my) == 'Alrady up to date.' ]] || \
22 echo "New commit at" "$1"
23fi
24
25echo "$(date)" check "$1" >> "$SETTING_DIR/log"