Improve file cleanning

This commit is contained in:
Jérôme Schneider 2013-11-13 16:56:37 +01:00
parent bf8de62b44
commit abfc85055d
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ while getopts hc:a:d: OPT; do
elif [ "archives" = $OPTARG ]; then
rm -rf $ORIGIN_PATH
elif [ "old" = $OPTARG ]; then
for file in `find $ORIGIN_PATH $BUILDER_RESULT -type f -mtime -60 -print`; do
for file in `find $ORIGIN_PATH -type f -mtime +60 -print`; do
rm $file
done
for file in `find $BUILDER_RESULT -type f -mtime +60 -print`; do
rm $file
done
else