blob: 1c08f2c3219bdc19a412a933819ba05b96bc6958 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/bash
if [ "$1" == "" -o "$2" == "" ]; then
echo "Syntax: $0 <target> <checkout> [<output-dir>]"
exit 1
fi
IFS='-' read distro version bits <<< $1
checkout=$2
output=$3
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 &
vbox=$!
sleep 10
ssh -p $port carl@localhost "rm -rf fedora-*"
ssh -p $port carl@localhost cdist -p dcpomatic -c $checkout -t host package
if [ "$output" != "" ]; then
scp -P $port carl@localhost:fedora-22-$bits/* $output/
fi
ssh -p $port carl@localhost "sudo /sbin/poweroff"
while [[ ( -d /proc/$vbox ) && ( -z `grep zombie /proc/$vbox/status` ) ]]; do
sleep 1
done
|