diff options
author | kris <kris@FreeBSD.org> | 2008-08-09 00:19:38 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2008-08-09 00:19:38 +0800 |
commit | f7fc279cb8428a8744634227b370acd53f96eea5 (patch) | |
tree | a5ca4b54b1b990e287d585749a7e8904d03c1377 /Tools/portbuild | |
parent | 2158c47e587ba9d926751e3d2365fed94dba6a38 (diff) | |
download | freebsd-ports-gnome-f7fc279cb8428a8744634227b370acd53f96eea5.tar.gz freebsd-ports-gnome-f7fc279cb8428a8744634227b370acd53f96eea5.tar.zst freebsd-ports-gnome-f7fc279cb8428a8744634227b370acd53f96eea5.zip |
Add an option to clean up old distfiles. We don't have enough space to
keep dozens of full distfile sets lying around.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/cpdistfiles | 10 |
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 |