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

improve daily cleanup scripts

parent b7fe44be
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,13 @@ function removeIf ()
function removeArtifactsDirIf ()
{
# echo "arg: $1";
if [ -z $1 ]
foundDirectory=$1
if [ -z "${foundDirectory}" ]
then
echo "ERROR: No argument. This function requires a directory as an argument. " ;
return 1;
fi
foundDirectory=$1
nSave=$2
if [ -z $nSave ]
......@@ -51,7 +51,7 @@ function removeArtifactsDirIf ()
nSave=1;
fi
if [ ! -d $foundDirectory ]
if [ ! \( -d "${foundDirectory}" \) ]
then
echo "ERROR: " "${foundDirectory}" ", is not a directory. This function requires a directory as an argument. "
return 2;
......
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