summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-08 08:47:49 +0200
committerErich Eckner <git@eckner.net>2017-06-08 08:47:49 +0200
commit9e4ce68f5479ec266ab814b7ab7f379808bd2406 (patch)
tree4f2fdc43a833282555eb2d636269abb2ec94fa92 /bin/get-package-updates
parent838c46e3140e95f95d5850e134f91a1f8acbb5eb (diff)
downloadbuilder-9e4ce68f5479ec266ab814b7ab7f379808bd2406.tar.xz
bin/get-package-updates: option --no-pull new
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates16
1 files changed, 12 insertions, 4 deletions
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.