[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: improve find command by using -regex
Holger Levsen
gitlab at salsa.debian.org
Fri Sep 14 18:34:40 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
55c4f432 by Holger Levsen at 2018-09-14T17:34:28Z
reproducible Archlinux: improve find command by using -regex
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_maintenance.sh
Changes:
=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -75,11 +75,11 @@ fi
# delete old temp directories in /tmp (probably only useful on profitbricks3+4)
#
echo "$(date -u) - Deleting temporary directories in /tmp, older than 3 days."
-OLDSTUFF=$(find /tmp -maxdepth 1 -type d -mtime +2 -name "tmp.*" -o -name "Test*" -o -name "usession-release*" -o -name "*test*" -exec ls -lad {} \; || true)
+OLDSTUFF=$(find /tmp -maxdepth 1 -type d -mtime +2 -regextype egrep -regex '/tmp/(tmp.*|Test.*|usession-release.*|.*test.*)' -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Old temp directories found in /tmp"
- find /tmp -maxdepth 1 -type d -mtime +2 -name "tmp.*" -o -name "Test*" -o -name "usession-release*" -o -name "*test*" -exec rm -rv {} \; || true
+ find /tmp -maxdepth 1 -type d -mtime +2 -regextype egrep -regex '/tmp/(tmp.*|Test.*|usession-release.*|.*test.*)' -exec rm -rv {} \; || true
echo "These old directories have been deleted."
echo
DIRTY=true
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/55c4f432543285b635c0c400ed84d01ec164db76
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/55c4f432543285b635c0c400ed84d01ec164db76
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180914/cc5c95b3/attachment.html>
More information about the Qa-jenkins-scm
mailing list