summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-10 10:55:14 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-10 10:55:14 +0100
commit1b8f04909963f55301b9e2caf796fd1ba0b768e6 (patch)
treeb5264a795adb64318f5f373c6d15fb2753547608 /bin
parent94e68380295d080f1eb975ad1160507825a42587 (diff)
downloadjenkins.debian.net-1b8f04909963f55301b9e2caf796fd1ba0b768e6.tar.xz
keep every 100th screenshot
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 72fdd216..f1485375 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -178,18 +178,21 @@ monitor_installation() {
if [ $(($NR % 150)) -eq 0 ] ; then
vncdo -s $DISPLAY key ctrl
fi
- # if this screenshot is the same as the one 400 screenshots ago, let stop this
- if [ $(($NR % 100)) -eq 0 ] && [ $NR -gt 400 ] ; then
- # from help let: "Exit Status: If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise."
- let OLD=NR-400
+ # take a screenshot for later publishing
+ if [ $(($NR % 100)) -eq 0 ] ; then
set -x
- if diff -q snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm ; then
- echo ERROR snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm match, ending installation.
- cp snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $NR).ppm.bak
- cp snapshot_$(printf "%06d" $OLD).ppm snapshot_$(printf "%06d" $OLD).ppm.bak
- ls -la snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm
- figlet "Installation hangs."
- break
+ cp snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $NR).ppm.bak
+ # if this screenshot is the same as the one 400 screenshots ago, let stop this
+ if [ $NR -gt 400 ] ; then
+ # from help let: "Exit Status: If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise."
+ let OLD=NR-400
+ if diff -q snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm ; then
+ echo ERROR snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm match, ending installation.
+ cp snapshot_$(printf "%06d" $OLD).ppm snapshot_$(printf "%06d" $OLD).ppm.bak
+ ls -la snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm
+ figlet "Installation hangs."
+ break
+ fi
fi
set +x
fi