Clean old files

This commit is contained in:
Jérôme Schneider 2013-11-12 17:06:36 +01:00
parent 077f91087b
commit 15e702bed2
1 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@ show_help()
echo $USAGE
echo ""
echo "-h: help"
echo "-c: cleanning cache git, deb, archives or all"
echo "-c: cleanning cache git, deb, archives, old or all"
echo "-a: amd64 and / or i368 (Default: amd64)"
echo "-d: Debian distribution like squeeze or / and wheezy (ex.: squeeze,wheezy)"
echo "GIT_REPOSITORY_NAME: respository name"
@ -58,6 +58,10 @@ while getopts hc:a:d: OPT; do
rm -rf $BUILDER_RESULT
elif [ "archives" = $OPTARG ]; then
rm -rf $ORIGIN_PATH
elif [ "old" = $OPTARG ]; then
for file in `find $ORIGIN_PATH $BUILDER_RESULT -mtime -60 -print`; do
rm $file
done
else
error "Bad cleanning option : $OPTARG"
fi