2
if [ "$1" != amd64 -a "$1" != i386 -a "$1" != lpia ]
4
echo "Invalid architecture: \"$1\". Valid choices are: amd64 i386 lpia"
10
if ! [ -d "`dirname "$1"`" ]
12
echo "`dirname "$1"` does not exist or is not a directory, so $1 cannot be created"
15
if ! [ -w "`dirname "$1"`" ]
17
echo "`dirname "$1"` is not writable, so $1 cannot be created"
25
echo "\"$1\" is not a directory"
30
echo "\"$1\" is not writable"
36
# Will verify that $1 is a valid Ubuntu suite,
37
# and if not, give the user the list of supported ones
41
if ! [ -f /usr/share/ubuntu-vm-builder/suites/"$1" ]
45
echo "Error: \"$1\" is not a supported suite"
46
echo "Supported suites are:"
47
ls /usr/share/ubuntu-vm-builder/suites/ | cat
53
# Will verify that $1 is a valid virtualisatin solution,
54
# and if not, give the user the list of supported ones
58
if ! [ -f /usr/share/ubuntu-vm-builder/vms/"$1" ]
62
echo "Error: \"$1\" is not a supported vm"
63
echo "Supported vms are:"
64
ls /usr/share/ubuntu-vm-builder/vms/ | cat