From: thierry Date: Thu, 17 Jan 2008 10:41:53 +0000 (+0000) Subject: a convenience script - mostly oneshot though X-Git-Tag: foo~366 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e7d69430848c01777c7eeb3585f8b7acc9aab31b;p=infrastructure.git a convenience script - mostly oneshot though --- diff --git a/scripts/trash-old-build.sh b/scripts/trash-old-build.sh new file mode 100755 index 0000000..a485ea3 --- /dev/null +++ b/scripts/trash-old-build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# for old-fashioned builds (new scheme is more sensible to this respect) +# +# typical disk space +# total : 4.5 G +# BUILD : 3.2 G +# CODEBASES : 400 M +# SOURCES : 460 M +# we keep only RPMS and SPRMS + +totrash="BUILD CODEBASES SOURCES tmp" + +for build in "$@" ; do + base=$(basename $build) + trashbase=/build/trash/$base + [ -d $trashbase ] || mkdir $trashbase + for dir in $totrash ; do + [ -d $build/$dir ] && mv $build/$dir $trashbase/$dir + done +done +