summaryrefslogtreecommitdiff
path: root/librerelease
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-21 13:27:02 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-21 13:27:02 -0300
commit4c4f7255e97bde5524e3798b4b777a94e37da23d (patch)
tree64a28f2efb14473b10798d17b513bd398bdbff1e /librerelease
parent6082f831bbacb174c050915d3b301910fb2ea261 (diff)
parent0663c0c58a8d04a35f5ba9ab6de068a3f6c09b40 (diff)
Merge branch 'master' into fauno
Diffstat (limited to 'librerelease')
-rwxr-xr-xlibrerelease12
1 files changed, 9 insertions, 3 deletions
diff --git a/librerelease b/librerelease
index 7df5184..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_packages; exit $? ;;
+ c) clean; exit $? ;;
+ n) dryrun="--dry-run" ;;
esac
done
@@ -72,6 +75,9 @@ done
clean_non_packages
msg "Uploading packages..."
rsync --recursive \
+ ${dryrun} \
+ --no-group \
+ --no-perms \
--copy-links \
--hard-links \
--partial \