index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-08 08:47:49 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-08 08:47:49 +0200 |
commit | 9e4ce68f5479ec266ab814b7ab7f379808bd2406 (patch) | |
tree | 4f2fdc43a833282555eb2d636269abb2ec94fa92 | |
parent | 838c46e3140e95f95d5850e134f91a1f8acbb5eb (diff) |
-rwxr-xr-x | bin/get-package-updates | 16 |
diff --git a/bin/get-package-updates b/bin/get-package-updates index 4ca3679..7a565d2 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -16,20 +16,23 @@ usage() { >&2 echo ' and build a list in the proper build order' >&2 echo '' >&2 echo 'possible options:' - >&2 echo ' -b|--block: If necessary, wait for lock blocking.' - >&2 echo ' -h|--help: Show this help and exit.' + >&2 echo ' -b|--block: If necessary, wait for lock blocking.' + >&2 echo ' -h|--help: Show this help and exit.' + >&2 echo ' -n|--no-pull: Do not pull git repos, merely reorder build list.' [ -z "$1" ] && exit 1 || exit $1 } eval set -- "$( - getopt -o bh \ + getopt -o bhn \ --long block \ --long help \ + --long no-pull \ -n "$(basename "$0")" -- "$@" || \ echo usage )" block_flag='-n' +pull=true while true do @@ -40,6 +43,9 @@ do -h|--help) usage 0 ;; + -n|--no-pull) + pull=false + ;; --) shift break @@ -73,7 +79,9 @@ for repo in "${repo_paths[@]}"; do git -C "${repo}" checkout -f master git -C "${repo}" clean -xdf git -C "${repo}" fetch - git -C "${repo}" reset --hard origin/master + if ${pull}; then + git -C "${repo}" reset --hard origin/master + fi done # Read previous git revision numbers from files. |