summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-28 02:58:08 +0100
committerHolger Levsen <holger@layer-acht.org>2014-10-28 02:58:18 +0100
commit3d48ade9e93c8c3f9c89ab26444f381980e15048 (patch)
tree8f6b02a705d06b7bb9b12d4ce5decbc88763d24c /bin
parent132edaad169fa798fc8a84818b5b23c57dd57f35 (diff)
downloadjenkins.debian.net-3d48ade9e93c8c3f9c89ab26444f381980e15048.tar.xz
reproducible_housekeeping.sh: clearer output.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_housekeeping.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/bin/reproducible_housekeeping.sh b/bin/reproducible_housekeeping.sh
index aeb7ce42..736dfb36 100755
--- a/bin/reproducible_housekeeping.sh
+++ b/bin/reproducible_housekeeping.sh
@@ -10,12 +10,10 @@ common_init "$@"
# common code defining db access
. /srv/jenkins/bin/reproducible_common.sh
-# common
-set +x
-set -e
-REP_RESULTS=/srv/reproducible-results
+DIRTY=false
# prepare backup
+REP_RESULTS=/srv/reproducible-results
mkdir -p $REP_RESULTS/backup
cd $REP_RESULTS/backup
@@ -29,9 +27,9 @@ fi
# actually do the backup
DATE=$(date '+%Y-%m-%d')
if [ ! -f reproducible_$DATE.db.xz ] ; then
- cp $PACKAGES_DB .
+ cp -v $PACKAGES_DB .
DATE=$(date '+%Y-%m-%d')
- mv reproducible.db reproducible_$DATE.db
+ mv -v reproducible.db reproducible_$DATE.db
xz reproducible_$DATE.db
fi
@@ -43,6 +41,7 @@ if [ ! -z "$OLDSTUFF" ] ; then
echo "$OLDSTUFF"
echo "Please cleanup manually."
echo
+ DIRTY=true
fi
# find and warn about pbuild leftovers
@@ -53,6 +52,7 @@ if [ ! -z "$OLDSTUFF" ] ; then
echo "$OLDSTUFF"
echo "Please cleanup manually."
echo
+ DIRTY=true
fi
# find processes which should not be there
@@ -70,6 +70,7 @@ if [ -s $RESULT ] ; then
echo
echo "Please cleanup manually."
echo
+ DIRTY=true
fi
rm $HAYSTACK $RESULT
@@ -96,7 +97,11 @@ if [ -s $PACKAGES ] ; then
echo "sqlite3 ${PACKAGES_DB} \"DELETE FROM sources_scheduled WHERE name = '$PKG';\""
done
echo
+ DIRTY=true
fi
rm $PACKAGES
-exit 0
+if ! $DIRTY ; then
+ echo "Everything seems to be fine."
+ echo
+fi