2015-virt-tools: Don't clean files when run in --quick mode.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 12 Dec 2015 14:58:43 +0000 (14:58 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 12 Dec 2015 14:58:43 +0000 (14:58 +0000)
2015-virt-tools/run

index 9a80550..bd67b29 100755 (executable)
@@ -7,10 +7,6 @@ set -e
 export GNOME_KEYRING_CONTROL=
 export GNOME_KEYRING_PID=
 
 export GNOME_KEYRING_CONTROL=
 export GNOME_KEYRING_PID=
 
-# Clean up everything.
-find -name '*~' -delete
-rm -f [1-9]000-*.d/*
-
 # No proxy.
 #unset http_proxy
 #unset https_proxy
 # No proxy.
 #unset http_proxy
 #unset https_proxy
@@ -21,6 +17,10 @@ guestfish -a /dev/null run || exit 1
 
 # If not 'quick mode', create the initial images.
 if [ "$1" != "--quick" ]; then
 
 # If not 'quick mode', create the initial images.
 if [ "$1" != "--quick" ]; then
+    # Clean up everything.
+    find -name '*~' -delete
+    rm -f [1-9]000-*.d/*
+
     pushd 1000-virt-resize.d
     virt-builder --format qcow2 fedora-22
     popd
     pushd 1000-virt-resize.d
     virt-builder --format qcow2 fedora-22
     popd