From e7d69430848c01777c7eeb3585f8b7acc9aab31b Mon Sep 17 00:00:00 2001 From: thierry Date: Thu, 17 Jan 2008 10:41:53 +0000 Subject: [PATCH] a convenience script - mostly oneshot though --- scripts/trash-old-build.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/trash-old-build.sh 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 + -- 2.47.0