diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-30 17:05:44 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-30 17:05:44 -0400 |
commit | 64e7456af141330ae33d51dc74a1ab331cfc3b2d (patch) | |
tree | 787e00203789ae5a73378201b6c7af3aa753ddaf /src/abslibre-tools/librerelease | |
parent | b0e8fd7096b986a40a59d7cf104c04fd40e185df (diff) |
librerelease: add -u flag for upload-only; don't run db-update
Diffstat (limited to 'src/abslibre-tools/librerelease')
-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#*:}")" |