diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-01 21:12:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-01 21:12:09 +0100 |
| commit | 7315bffa601f357f0998e4446289faf74cc1ee08 (patch) | |
| tree | 9fb6534a59f472e1bf3c2a38c46872eaca51855f /vmbuild | |
| parent | 05e8f8ae9bc9764e9d1510ae4d3a0d87e9b28e12 (diff) | |
Add vmbuild script, for want of anywhere else to keep it.
Diffstat (limited to 'vmbuild')
| -rwxr-xr-x | vmbuild | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#!/bin/bash + +if [ "$1" == "" ]; then + echo "Syntax: $0 <target> [<checkout>]" +fi + +IFS='-' read distro version bits <<< $1 + +if [ "$2" != "" ]; then + checkout="-c $2" +fi + +if [ "$bits" == "32" ]; then + port=2000 +elif [ "$bits" == "64" ]; then + port=2001 +else + echo "Unrecognised bit depth $bits" + exit 1 +fi + +nohup vboxheadless --startvm fedora-22-$bits & +sleep 10 +ssh -p $port carl@localhost "rm -rf fedora-*" +ssh -p $port carl@localhost cdist -p dcpomatic -c $checkout -t host package +scp -P $port carl@localhost:fedora-22-$bits/* . +ssh -p $port carl@localhost "sudo /sbin/poweroff" + |
