aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2008-08-08 16:19:38 +0000
committerKris Kennaway <kris@FreeBSD.org>2008-08-08 16:19:38 +0000
commit5918a825ade9f74590531947009557decb1fefc3 (patch)
tree1bd04f6ed84a282e4eab9a6b49bb78280a50ceea /Tools
parentd6eb6d08c2a851bb6d15031e7b18570409cc5f43 (diff)
downloadports-5918a825ade9f74590531947009557decb1fefc3.tar.gz
ports-5918a825ade9f74590531947009557decb1fefc3.zip
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/cpdistfiles10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/cpdistfiles b/Tools/portbuild/scripts/cpdistfiles
index a8a4e76c3ed8..8b38c0b36501 100755
--- a/Tools/portbuild/scripts/cpdistfiles
+++ b/Tools/portbuild/scripts/cpdistfiles
@@ -16,14 +16,23 @@ builddir=${pb}/${arch}/${branch}/builds/${buildid}
yesreally=0
dryrun=-n
+cleanup=0
if [ "$4" = "-yesreally" ]; then
yesreally=1
dryrun=
+elif [ "$4" = "-cleanup" ]; then
+ cleanup=1
fi
distdir=${builddir}/distfiles/
log=${builddir}/logs/.distfiles
+if [ "${cleanup}" -eq 1 ]; then
+ echo "Removing distfiles"
+ rm -rf ${distdir} || exit 1
+ exit 0
+fi
+
if [ -e ${distdir}/.pbtmp ]; then
echo "${distdir} has not been processed!"
exit 1
@@ -36,4 +45,5 @@ if [ "$yesreally" = "0" ]; then
echo "--> Will transfer ${num} files - make sure this is what you want and rerun '$0 $* -yesreally'"
else
echo "--> Transferred ${num} files - results in ${log}"
+ echo " Now run '$0 $1 $2 $3 -cleanup' to remove distfiles and save space"
fi