Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Webtools Releng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
webtools
Releng
Webtools Releng
Commits
aae11dc6
Commit
aae11dc6
authored
14 years ago
by
david_williams
Browse files
Options
Downloads
Patches
Plain Diff
cleanup more during daily cleanup
parent
508036cc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
releng.control/cleanupArtifacts.sh
+4
-12
4 additions, 12 deletions
releng.control/cleanupArtifacts.sh
releng.control/removeArtifactDirIf.sh
+1
-1
1 addition, 1 deletion
releng.control/removeArtifactDirIf.sh
with
5 additions
and
13 deletions
releng.control/cleanupArtifacts.sh
+
4
−
12
View file @
aae11dc6
...
@@ -73,13 +73,12 @@ echo;
...
@@ -73,13 +73,12 @@ echo;
# requires parent Directiory as first argument
# requires parent Directiory as first argument
# if nDays not specified as second argument, then 0 is assumed
# if nDays not specified as second argument, then 0 is assumed
# (which is one day)
# (which is one day)
# if "saveAtLeast" is not set, as third argument, then assumed to be 1
# (that is, at least "saveAtLeast" directories will be saved, no matter how old)
function
removeOldDirectories
()
{
function
removeOldDirectories
()
{
parentDir
=
$1
;
parentDir
=
$1
;
ndays
=
$2
;
ndays
=
$2
;
saveAtLeast
=
$3
;
if
[
-z
$parentDir
]
if
[
-z
$parentDir
]
then
then
...
@@ -95,13 +94,6 @@ else
...
@@ -95,13 +94,6 @@ else
echo
"INFO: ndays set to
$ndays
"
;
echo
"INFO: ndays set to
$ndays
"
;
fi
fi
if
[
-z
saveAtLeast
]
then
echo
"INFO: saveAtLeast not specified, 1 assumed"
;
saveAtLeast
=
0
else
echo
"INFO: saveAtLeast set to
$saveAtLeast
"
;
fi
echo
;
echo
;
echo
" Removing directories older than
${
ndays
}
days"
;
echo
" Removing directories older than
${
ndays
}
days"
;
...
@@ -110,9 +102,9 @@ before=`find ${parentDir} -mindepth 1 -maxdepth 1 | wc -l`;
...
@@ -110,9 +102,9 @@ before=`find ${parentDir} -mindepth 1 -maxdepth 1 | wc -l`;
echo
" number of directories before cleaning:
${
before
}
"
;
echo
" number of directories before cleaning:
${
before
}
"
;
# empty directories often result from "bad builds". We remove those no matter how old
# empty directories often result from "bad builds". We remove those no matter how old
find
${
parentDir
}
-mindepth
1
-maxdepth
1
-type
d
-empty
-exec
rm
-fr
'{}'
\;
find
${
parentDir
}
-mindepth
1
-maxdepth
2
-type
d
-empty
-exec
rm
-fr
'{}'
\;
# now remove old ones
# now remove old ones
find
${
parentDir
}
-mindepth
1
-maxdepth
1
-type
d
-ctime
+
$ndays
-exec
dir
${
RELENG_CONTROL
}
/removeIf.sh
'{}'
\;
find
${
parentDir
}
-mindepth
1
-maxdepth
1
-type
d
-ctime
+
$ndays
-exec
${
RELENG_CONTROL
}
/removeIf.sh
'{}'
\;
after
=
`
find
${
parentDir
}
-mindepth
1
-maxdepth
1 |
wc
-l
`
;
after
=
`
find
${
parentDir
}
-mindepth
1
-maxdepth
1 |
wc
-l
`
;
echo
" number of directories after cleaning:
${
after
}
"
;
echo
" number of directories after cleaning:
${
after
}
"
;
...
...
This diff is collapsed.
Click to expand it.
releng.control/removeArtifactDirIf.sh
+
1
−
1
View file @
aae11dc6
...
@@ -42,7 +42,7 @@ fi
...
@@ -42,7 +42,7 @@ fi
if
[
-d
$foundDirectory
]
if
[
-d
$foundDirectory
]
then
then
rm
-fr
$foundDirectory
rm
-fr
$foundDirectory
echo
" removed:
$foundDirectory
"
;
echo
"
removed:
$foundDirectory
"
;
else
else
echo
"ERROR: the foundDirectory,
$foundDirectory
, is not a directory"
echo
"ERROR: the foundDirectory,
$foundDirectory
, is not a directory"
fi
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment