updated build system

This commit is contained in:
Scott E. Graves 2024-07-09 14:28:39 -05:00
parent da07122997
commit 68c9ec0f82

View File

@ -1,12 +1,12 @@
#!/bin/bash
DEST_DIR=$(realpath $2)
TEMP_DIR=$(mktemp -d)
DEST_DIR=$1
CURRENT_DIR=$(dirname "$0")
CURRENT_DIR=$(realpath ${CURRENT_DIR})
. "${CURRENT_DIR}/env.sh" "$3" "$4" "$5" "$6" "$7"
. "${CURRENT_DIR}/env.sh" "$2" "$3" "$4" "$5" "$6"
if [ -f "${CURRENT_DIR}/../build/version.sh" ]; then
source ${CURRENT_DIR}/../build/version.sh
@ -37,13 +37,18 @@ if [ ! -d "${PROJECT_DIST_DIR}" ]; then
exit 1
fi
if [ "${DEST_DIR}" == "" ] || [ ! -d "${DEST_DIR}" ]; then
if [ "${DEST_DIR}" == "" ]; then
DEST_DIR="${CURRENT_DIR}/../dist"
fi
DEST_DIR=$(realpath "${DEST_DIR}")
if [ ! -d "${DEST_DIR}" ]; then
echo "Destination directory not found: ${DEST_DIR}"
exit 1
fi
PACKAGE_ROOT=${PROJECT_DIST_DIR}/..
PACKAGE_ROOT=$(realpath ${PACKAGE_ROOT})
PACKAGE_ROOT="${PROJECT_DIST_DIR}/.."
PACKAGE_ROOT=$(realpath "${PACKAGE_ROOT}")
rsync -av --progress ${PACKAGE_ROOT}/ ${TEMP_DIR}/ || exit_and_clean "Failed to rsync" 1