diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cd_tester.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index 89c89ddc..4860683a 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -45,7 +45,7 @@ cleanup_all() { # cleanup # umount $IMAGE_MNT - sudo rm $IMAGE $NAME.qcow + sudo rm $NAME.qcow # # create video # @@ -90,8 +90,12 @@ monitor_installation() { trap cleanup_all INT TERM EXIT -wget $IMAGE_URL -mkdir -p $IMAGE_MNT +# only wget if $IMAGE is older than a week (60*24*7=10080) +if test $(find $IMAGE -mmin +10080) ; then + rm $IMAGE + wget $IMAGE_URL +fi +sudo mkdir -p $IMAGE_MNT mount -o loop $IMAGE $IMAGE_MNT bootstrap monitor_installation |