diff options
-rwxr-xr-x | src/abslibre-tools/librerelease | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index cdc5536..adfb935 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -39,6 +39,7 @@ . $(librelib conf.sh) dryrun="" +upload_only=false readonly rsync_flags=( --no-group --no-perms @@ -129,8 +130,10 @@ usage() { to parabola server.' echo print "Options:" - flag '-c' 'Clean packages on $WORKDIR/staging' - flag '-l' "Only list packages but not upload them" + flag '-c' 'Clean; delete packages in $WORKDIR/staging' + flag '-l' "List; list packages but not upload them" + flag '-u' "Upload-only; do not run db-update on the server" + flag '-n' "Dry-run; don't actually do anything" flag '-h' "Show this message" } @@ -143,10 +146,11 @@ main() { # Parse options local mode="release_packages" - while getopts 'clnh' arg; do + while getopts 'clunh' arg; do case $arg in c) mode=clean ;; l) mode=pretty_print_packages ;; + u) upload_only=true ;; n) dryrun="--dry-run" ;; h) mode=usage ;; *) usage >/dev/stderr; return 1 ;; @@ -236,6 +240,10 @@ release_packages() { clean_files "$file_list" + if $upload_only; then + return 0 + fi + msg "Running db-update on repos" ssh ${REPODEST%%:*} "$(printf 'STAGING=%q dbscripts/db-update' "${REPODEST#*:}")" |