summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-07 11:20:47 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-07 11:20:47 -0300
commitb8eaf0cced1693e51d89db691664e66509f7549b (patch)
treee8443a50f2c72218a49bbd26feeaa9bda050225d
parent941527868d956c45f9e90714aee6b668a5ce28ab (diff)
Added untested librerelease dry-run
-rwxr-xr-xlibrerelease8
-rwxr-xr-xmips64el/mipsrelease4
2 files changed, 10 insertions, 2 deletions
diff --git a/librerelease b/librerelease
index 5283114..0bad896 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} \
--copy-links \
--hard-links \
--partial \
diff --git a/mips64el/mipsrelease b/mips64el/mipsrelease
index b8ff01d..1a4aade 100755
--- a/mips64el/mipsrelease
+++ b/mips64el/mipsrelease
@@ -10,6 +10,8 @@
source /etc/makepkg.conf
source /etc/libretools.conf
+libretoolsdir="$(dirname $0)/../"
+
usage() {
echo "$0 repo package1 [ package2 ... packageN ]"
echo
@@ -53,4 +55,6 @@ pushd ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null
tar xvf $SRCPKGDEST/${pkgbase:-${pkgname[0]}}-${fullver}${SRCEXT}
popd >/dev/null
+$libretoolsdir/chcleanup || true
+
exit $?