diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-09-19 11:02:54 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-09-19 11:02:54 -0300 |
commit | 0663c0c58a8d04a35f5ba9ab6de068a3f6c09b40 (patch) | |
tree | 46bc1b0b26d75db7aeb17c24615e5ef83d32355b /librerelease | |
parent | 1cc99571dd8b5f250909025a1c4df73510087899 (diff) | |
parent | 32acbf2d80898a1139325f3d058753b125c0bd7e (diff) |
Merge branch 'master' of ssh://gparabola/libretools
Conflicts:
librerelease
Diffstat (limited to 'librerelease')
-rwxr-xr-x | librerelease | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/librerelease b/librerelease index 55a1270..56cf856 100755 --- a/librerelease +++ b/librerelease @@ -34,6 +34,7 @@ function usage { echo "$(gettext " -h this message.")" echo "$(gettext " -l only list packages but not upload them.")" echo "$(gettext " -c clean packages on $WORKDIR/staging.")" + echo "$(gettext " -n dry-run")" } function list_packages { @@ -52,16 +53,18 @@ function clean_non_packages { -delete } -# Clean everything +# Clean everything if not on dry-run mode function clean { + [ -z ${dryrun} ] && \ find ${WORKDIR}/staging/ -type f -delete } -while getopts 'hlc' arg; do +while getopts 'hlcn' arg; do case $arg in h) usage; exit 0 ;; l) list_packages; exit 0 ;; c) clean; exit $? ;; + n) dryrun="--dry-run" ;; esac done @@ -72,6 +75,7 @@ done clean_non_packages msg "Uploading packages..." rsync --recursive \ + ${dryrun} \ --no-group \ --no-perms \ --copy-links \ |