2015 virt tools talk.
[libguestfs-talks.git] / 2015-virt-tools / run
diff --git a/2015-virt-tools/run b/2015-virt-tools/run
new file mode 100755 (executable)
index 0000000..9a80550
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash -
+# Run the talk.
+
+set -e
+
+# Avoid GNOME keyring stupidity
+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
+#unset ftp_proxy
+
+# Get everything into the cache.
+guestfish -a /dev/null run || exit 1
+
+# If not 'quick mode', create the initial images.
+if [ "$1" != "--quick" ]; then
+    pushd 1000-virt-resize.d
+    virt-builder --format qcow2 fedora-22
+    popd
+
+    pushd 2000-virt-sparsify.d
+    qemu-img convert ../1000-virt-resize.d/fedora-22.qcow2 -O raw -o preallocation=falloc fedora-22.img
+    popd
+
+    pushd 3000-virt-customize.d
+    qemu-img convert ../1000-virt-resize.d/fedora-22.qcow2 -O raw fedora-22.img
+    popd
+
+    pushd 4000-virt-sysprep.d
+    qemu-img convert ../1000-virt-resize.d/fedora-22.qcow2 -O raw fedora-22.img
+    popd
+
+    pushd 5000-virt-builder.d
+    popd
+fi
+
+# Run techtalk.
+#techtalk-pse
+~/d/techtalk-pse/techtalk-pse