Skip to content
Snippets Groups Projects
Commit e5298178 authored by david_williams's avatar david_williams
Browse files

initial cleanup task

parent b3ac0b3c
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# remember to leave no slashes on filename in source command,
# (the commonVariations.shsource file, that is)
# so that users path is used to find it (first)
if [ -n $BUILD_INITIALIZED ]
then
......
#!/bin/sh
# remember to leave no slashes on filename in source command,
# (the commonVariations.shsource file, that is)
# so that users path is used to find it (first)
if [ -n $BUILD_INITIALIZED ]
then
source commonVariations.shsource
source ${BUILD_HOME}/releng.control/commonComputedVariables.shsource
fi
# remove artifacts over n days old
# (where hours = 24 + (n * 24), basically, so that
# even n=0 means "1 day")
n=4;
echo " Removing artifact directories older than $n days";
echo " number of directories before cleaning: ";
find ./ -mindepth 2 -maxdepth 2 | wc -l
find ./ -mindepth 2 -maxdepth 2 -ctime +$n -exec rm -fr '{}' \;
echo " number of directories after cleaning: ";
find ./ -mindepth 2 -maxdepth 2 | wc -l
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment