git://git.onelab.eu
/
infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get rid of the endless list of daily mails, log stuff in /root/.nightly-clean-trash...
[infrastructure.git]
/
scripts
/
nightly-clean-trash.sh
diff --git
a/scripts/nightly-clean-trash.sh
b/scripts/nightly-clean-trash.sh
index
11b2078
..
014806b
100755
(executable)
--- a/
scripts/nightly-clean-trash.sh
+++ b/
scripts/nightly-clean-trash.sh
@@
-3,6
+3,11
@@
# -mtime +1 : older than one day
# grep -v : preserve the top directory
# -mtime +1 : older than one day
# grep -v : preserve the top directory
+exec >> /root/.nightly-clean-trash.log
+exec 2>&1
+
+date
+
[[ -n "$@" ]] && [ "$1" = "-n" ] && set -x
todelete=$(find /build/trash -maxdepth 1 -mtime +1 -print | grep -v 'trash/*$')
[[ -n "$@" ]] && [ "$1" = "-n" ] && set -x
todelete=$(find /build/trash -maxdepth 1 -mtime +1 -print | grep -v 'trash/*$')