Files
clover_vm/build.sh
2020-07-20 21:55:01 +03:00

29 lines
685 B
Bash
Executable File

#!/bin/bash
set -e
# FIXME: Use system Packer if possible
#PACKER=$(which packer)
#if [ "x${PACKER}" == "x" ]; then
PACKER="./packer"
if [ ! -f ${PACKER} ]; then
echo "Packer not found; downloading v1.5.4 from Hashicorp"
wget https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip
unzip packer_1.5.4_linux_amd64.zip
rm packer_1.5.4_linux_amd64.zip
fi
echo "--- Using Packer version $(${PACKER} --version)"
if [ ! -f output-virtualbox-iso/clever-devel.ova ]; then
echo "--- Building base image"
${PACKER} build -only=virtualbox-iso base_vm.json
fi
echo "--- Building extended image"
${PACKER} build ros_ide_vm.json
echo "--- All done!"