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