From 77bbb74ebdf2c4c4ce656544d79477a5b268c58a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Apr 2025 17:54:39 +0000 Subject: [PATCH] add helper script build-install-local.sh This helper script is used to build and install an 'app-only' version of the package onto the local system. This is intendend to be used on the VM as a way to quickly test new updates to the configuration files using images already available on the system. This is MUCH faster than packaging with images. --- build-install-local.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 build-install-local.sh diff --git a/build-install-local.sh b/build-install-local.sh new file mode 100755 index 00000000..a50d3ba7 --- /dev/null +++ b/build-install-local.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +LOCATION="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +# build an app-only package (ie don't include images) and store the package path +echo "building app-only package" +package=$(${LOCATION}/package --app | awk -F'saved package: ' '/^saved package: / {print $2}') +echo "generated package: {package}" + +# use a temp folder for unpacking and make sure to clean up when done +tmp="/tmp/build-install-local-$(date +%s)" +echo "prepping temp folder: {tmp}" +rm -rf $tmp +mkdir -p $tmp +trap 'rm -rf $tmp' EXIT + +# unpack to temp folder +echo "unpacking app package: $package" +tar xf $package -C $tmp + +# install package +echo "installing package" +${tmp}/*/install.sh + +echo "done."