Files
streamline-emr/build-install-local.sh
root 77bbb74ebd 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.
2025-04-11 17:54:39 +00:00

26 lines
702 B
Bash
Executable File

#!/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."