(no commit message)
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Tue, 19 Jan 2010 09:08:38 +0000 (09:08 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Tue, 19 Jan 2010 09:08:38 +0000 (09:08 +0000)
scripts/trim-vserver-builds.sh [moved from scripts/trash-old-build.sh with 62% similarity]

similarity index 62%
rename from scripts/trash-old-build.sh
rename to scripts/trim-vserver-builds.sh
index a485ea3..2f44f50 100755 (executable)
 totrash="BUILD CODEBASES SOURCES tmp"
 
 for build in "$@" ; do
+    text_base=$(basename $build .log.txt)
+    if [ "$text_base" != "$base" ] ; then
+       echo "Removing txt link $build"
+       rm "$base"
+       continue
+    fi
     base=$(basename $build)
     trashbase=/build/trash/$base
     [ -d $trashbase ] || mkdir $trashbase
     for dir in $totrash ; do
-       [ -d $build/$dir ] && mv $build/$dir $trashbase/$dir
+       if [ -d $build/$dir ] ; then
+           echo "Trashing $build/$dir"
+           mv $build/$dir $trashbase/$dir
+       fi
     done
 done