diff options
| author | Hsieh Chin Fan <typebrook@gmail.com> | 2020-09-08 11:18:49 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <typebrook@gmail.com> | 2020-09-08 11:18:49 +0800 |
| commit | 021d2df326adba6fe9c028d65d1445a28753773e (patch) | |
| tree | bba8188ff9645a1abe445529016f58f5e276e704 /tools/check_upstream | |
| parent | 4944344d5add3d8b8265deef39dd368d44873c1b (diff) | |
update
Diffstat (limited to 'tools/check_upstream')
| -rwxr-xr-x | tools/check_upstream | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/check_upstream b/tools/check_upstream deleted file mode 100755 index e9e8841..0000000 --- a/tools/check_upstream +++ /dev/null | |||
| @@ -1,24 +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 | if [ ! -d "$1" ]; then | ||
| 8 | return 0 | ||
| 9 | fi | ||
| 10 | |||
| 11 | head='dev' | ||
| 12 | if [ $# -eq 2 ] | ||
| 13 | then | ||
| 14 | head=$2 | ||
| 15 | fi | ||
| 16 | |||
| 17 | cd "$1" && \ | ||
| 18 | git fetch origin && \ | ||
| 19 | if ! git rev-list "$head" | grep "$(git rev-parse origin/master)" > /dev/null; then | ||
| 20 | [[ $(git pull my) == 'Alrady up to date.' ]] || \ | ||
| 21 | echo "New commit at" "$1" | ||
| 22 | fi | ||
| 23 | |||
| 24 | echo "$(date)" check "$1" >> "$SETTING_DIR/log" | ||