From 9606fd0e755d46091738b36f946ac813aa9c2ec7 Mon Sep 17 00:00:00 2001 From: Alexey Rogachevskiy Date: Mon, 24 Feb 2020 18:27:38 +0300 Subject: [PATCH] Add automated build script --- build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2ee16fc --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +PACKER=$(which packer) + +if [ "x${PACKER}" == "x" ]; 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 + PACKER="./packer" +fi + +echo "--- Using Packer version $(${PACKER} --version)" + +echo "--- Building base image" + +${PACKER} build base_vm.json + +echo "--- Building extended image" + +${PACKER} build ros_ide_vm.json + +echo "--- All done!"