improve daily cleanup scripts
diff --git a/releng.control/cleanupArtifacts.sh b/releng.control/cleanupArtifacts.sh
index d5b7110..252c163 100644
--- a/releng.control/cleanupArtifacts.sh
+++ b/releng.control/cleanupArtifacts.sh
@@ -164,15 +164,19 @@
# artifacts are special, since they have a three-layer directory structure,
# and we want to be sure to always retain at least one, no matter how old.
+echo;
echo "INFO: Checking to remove old artifacts."
removeOldArtifactsDirectories ${PROJECT_ARTIFACTS} 3 1;
+echo;
echo "INFO: Checking to remove old project working directories."
removeOldDirectories ${PROJECT_PROJECTS} 0;
+echo;
echo "INFO: Checking to remove old testing directories."
removeOldDirectories ${PROJECT_TESTS} 0;
-
+
+echo;
echo "INFO: Checking to remove old tmp directories and files."
removeOldDirectoriesAndFiles ${RECOMMENDED_TMP_DIR} 13;
@@ -186,9 +190,11 @@
# autodownload so when if/when we want it, we have to get our selves, and copy into prereqs directory.
# And one of those, I think oagis_release? has some write protected files that prevents their deletion,
# once unzipped, so we have tweeked the permissions.
+echo;
echo "INFO: Checking to remove old pre-req directories and files not accessed for 3 months."
removeOldDirectoriesAndFiles ${LOCAL_PREREQS_CACHE} 90;
+echo;
echo "INFO: Checking to remove old basebuilders not accessed for 3 months."
removeOldDirectories ${BASE_BUILDERS} 90;
diff --git a/releng.control/removeUtils.shsource b/releng.control/removeUtils.shsource
index 89b604c..acb8875 100644
--- a/releng.control/removeUtils.shsource
+++ b/releng.control/removeUtils.shsource
@@ -22,15 +22,15 @@
cd $foundDirectory
rm -fr $foundDirectory
- rc=$?
- if [ $rc -eq 0 ]
+ rcode=$?
+ if [ $rcode -eq 0 ]
then
echo " removed: $foundDirectory";
else
- echo "WARNING: rc: " $rc " could not remove " $foundDirectory;
+ echo "WARNING: rm returned non zero return code: " $rccode ". could not remove " $foundDirectory;
fi
- return $rc;
+ return $rcode;
}
# function that can remove a directory (e.g. via find) but checks to make sure not to remove the last one (or, last 'saveAtLeast')
@@ -82,14 +82,14 @@
fi
rm -fr $foundDirectory
- rc=$?
- if [ $rc -eq 0 ]
+ rcode=$?
+ if [ $rcode -eq 0 ]
then
echo " removed: $foundDirectory";
else
- echo "WARNING: rc: " $rc ". could not remove " $foundDirectory;
+ echo "WARNING: rm returned non zero return code: " $rccode ". could not remove " $foundDirectory;
fi
- return $rc;
+ return $rcode;
}