summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-20 09:14:19 +0200
committerErich Eckner <git@eckner.net>2017-06-20 09:14:19 +0200
commit5690015c7e4e3ac86d805cb88c237fda43386e50 (patch)
tree1434062c856b6b7791e5486aff7d1a2814ef6dbf /bin/db-update
parentb8f9e2c10e7b475e61cd00f3042f5446117cdae6 (diff)
downloadbuilder-5690015c7e4e3ac86d805cb88c237fda43386e50.tar.xz
bin/db-update: --from new
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update19
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/db-update b/bin/db-update
index d5e6009..d70d37e 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -25,8 +25,10 @@ usage() {
>&2 echo ' move packages on the command line from testing to stable.'
>&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 ' -f|--from $file: Read packages to move from testing to'
+ >&2 echo ' stable from $file (- is stdin).'
+ >&2 echo ' -h|--help: Show this help and exit.'
[ -z "$1" ] && exit 1 || exit $1
}
@@ -154,8 +156,9 @@ move_package() {
}
eval set -- "$(
- getopt -o bh \
+ getopt -o bf:h \
--long block \
+ --long from: \
--long help \
-n "$(basename "$0")" -- "$@" || \
echo usage
@@ -169,6 +172,14 @@ do
-b|--block)
block_flag=''
;;
+ -f|--from)
+ shift
+ if [ "x$1" = "x-" ]; then
+ packages_to_stabilize=$(cat)
+ else
+ packages_to_stabilize=$(cat "$1")
+ fi
+ ;;
-h|--help)
usage 0
;;
@@ -184,7 +195,7 @@ do
shift
done
-packages_to_stabilize=${@}
+packages_to_stabilize=${packages_to_stabilize} ${@}
for package in ${packages_to_stabilize}; do
# some sanity checks