mirror of
https://github.com/CopterExpress/clover_vm.git
synced 2026-05-26 07:07:58 +00:00
First invocation will most likely fail, but I can't see other major differences between working (travis-integration branch) and not working (main branch) Virtualboxes.
35 lines
946 B
Bash
Executable File
35 lines
946 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 --progress=dot:giga 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)"
|
|
|
|
# FIXME: This will fail, but might help virtualbox in travis?
|
|
#if [ ! -f output-virtualbox-iso/clever-devel.ova ]; then
|
|
echo "--- Building base image"
|
|
${PACKER} build -only=virtualbox-iso base_vm.json || true
|
|
#fi
|
|
|
|
echo "--- Building extended image"
|
|
|
|
${PACKER} build ros_ide_vm.json
|
|
|
|
echo "--- Marking the VM"
|
|
|
|
GIT_REV=$(git rev-parse --short HEAD)
|
|
mv ./output-virtualbox-ovf/clever-devel.ova ./output-virtualbox-ovf/clover-devel_v0.20+${GIT_REV}.ova
|
|
|
|
echo "--- All done!"
|