More multi-profile work

This commit is contained in:
2023-01-12 16:40:39 -05:00
parent 3683296110
commit 860631cf7d

View File

@@ -526,6 +526,9 @@ init() {
debug || echo "To enable debugging output, use --debug or -d"
# Save the script directory
SCRIPTDIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit $? ; pwd -P)"
if [[ -e "/etc/os-release" ]]; then
source "/etc/os-release"
else
@@ -629,7 +632,6 @@ main() {
declare -gn P_ARR="$profile"
# Fallback to SCRIPTDIR if BUILDROOT has not been set
SCRIPTDIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit $? ; pwd -P)"
BUILDROOT="${BUILDROOT:=$SCRIPTDIR}"
FILESDIR="${FILESDIR:=$BUILDROOT/files}"