summaryrefslogtreecommitdiffstats
path: root/misc-scripts/sourceballs-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-11-21 12:40:29 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-11-21 12:40:29 +0100
commit948583aebe9e8e5a3daa9131c99dc68724e06b49 (patch)
treeb63b0290d54226624d039b9383873827952f1785 /misc-scripts/sourceballs-cleanup
parent42197d1f0f313f3608b8656662347d00885e6b5c (diff)
downloaddbscripts-948583aebe9e8e5a3daa9131c99dc68724e06b49.tar.gz
dbscripts-948583aebe9e8e5a3daa9131c99dc68724e06b49.tar.xz
sourceballs: respect the dryrun setting
Diffstat (limited to 'misc-scripts/sourceballs-cleanup')
-rwxr-xr-xmisc-scripts/sourceballs-cleanup10
1 files changed, 6 insertions, 4 deletions
diff --git a/misc-scripts/sourceballs-cleanup b/misc-scripts/sourceballs-cleanup
index f75c688..450d137 100755
--- a/misc-scripts/sourceballs-cleanup
+++ b/misc-scripts/sourceballs-cleanup
@@ -8,6 +8,8 @@ logfile="${LOGDIR}/sourceballs/cleanup.txt"
script_lock
+${CLEANUP_DRYRUN} && warning 'dry run mode is active'
+
remove_old() {
if [ -d "$1" ]; then
pushd "$1" >/dev/null
@@ -36,7 +38,7 @@ remove_old() {
fi
done
if [ $skip -ne 1 ]; then
- mv "$srcpkg" $SOURCE_CLEANUP_DESTDIR
+ ${CLEANUP_DRYRUN} || mv "$srcpkg" $SOURCE_CLEANUP_DESTDIR
fi
fi
done
@@ -65,14 +67,14 @@ for sourceball in "${FTP_BASE}/${SRCPOOL}"/*$SRCEXT; do
echo "$packagename : svn died during export. Skipping sourceball." >> "$logfile"
else
echo "$packagename : no longer in svn. Removing sourceball." >> "$logfile"
- mv $sourceball $SOURCE_CLEANUP_DESTDIR
+ ${CLEANUP_DRYRUN} || mv $sourceball $SOURCE_CLEANUP_DESTDIR
fi
elif [ -z "$(ls -A "$packagename/repos")" ]; then
echo "$packagename : no longer in repos but trunk is still in svn. Removing sourceball." >> "$logfile"
- mv $sourceball $SOURCE_CLEANUP_DESTDIR
+ ${CLEANUP_DRYRUN} || mv $sourceball $SOURCE_CLEANUP_DESTDIR
elif ! source "$packagename/trunk/PKGBUILD" && chk_license ${license[@]}; then
echo "$packagename : source hosting no longer required by license. Removing sourceball." >> "$logfile"
- mv $sourceball $SOURCE_CLEANUP_DESTDIR
+ ${CLEANUP_DRYRUN} || mv $sourceball $SOURCE_CLEANUP_DESTDIR
else
remove_old "$packagename/repos/"
fi