get rid of the endless list of daily mails, log stuff in /root/.nightly-clean-trash...
[infrastructure.git] / scripts / nightly-clean-trash.sh
index 11b2078..014806b 100755 (executable)
@@ -3,6 +3,11 @@
 # -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/*$')