summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_maintainance.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh
index d8e71d82..bbffa231 100755
--- a/bin/reproducible_maintainance.sh
+++ b/bin/reproducible_maintainance.sh
@@ -59,12 +59,26 @@ if [ ! -z "$OLDSTUFF" ] ; then
fi
# find and warn about pbuild leftovers
-OLDSTUFF=$(find /var/cache/pbuilder/result/ -mtime +0 -exec ls -lad {} \;)
+OLDSTUFF=$(find /var/cache/pbuilder/result/ -mtime +1 -exec ls -lad {} \;)
if [ ! -z "$OLDSTUFF" ] ; then
- echo
- echo "Warning: old files or directories found in /var/cache/pbuilder/result/"
- echo "$OLDSTUFF"
- echo "Please cleanup manually."
+ # delete known files
+ echo "Attempting file detection..."
+ cd /var/cache/pbuilder/result/
+ for i in $(find . -maxdepth 1 -mtime +1 -type f) ; do
+ case $i in
+ stderr|stdout) rm -v $i
+ ;;
+ *) ;;
+ esac
+ done
+ cd -
+ # report the rest
+ OLDSTUFF=$(find /var/cache/pbuilder/result/ -mtime +1 -exec ls -lad {} \;)
+ if [ ! -z "$OLDSTUFF" ] ; then
+ echo "Warning: old files or directories found in /var/cache/pbuilder/result/"
+ echo "$OLDSTUFF"
+ echo "Please cleanup manually."
+ fi
echo
DIRTY=true
fi