From 3d48ade9e93c8c3f9c89ab26444f381980e15048 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 28 Oct 2014 02:58:08 +0100 Subject: reproducible_housekeeping.sh: clearer output. --- bin/reproducible_housekeeping.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2