Clean old files
This commit is contained in:
parent
077f91087b
commit
15e702bed2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue