From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- packaging/macos/jhb/etc/jhb.conf.sh | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 packaging/macos/jhb/etc/jhb.conf.sh (limited to 'packaging/macos/jhb/etc/jhb.conf.sh') diff --git a/packaging/macos/jhb/etc/jhb.conf.sh b/packaging/macos/jhb/etc/jhb.conf.sh new file mode 100644 index 0000000..398e9d3 --- /dev/null +++ b/packaging/macos/jhb/etc/jhb.conf.sh @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: 2022 René de Hesselle +# +# SPDX-License-Identifier: GPL-2.0-or-later + +### description ################################################################ + +# This is a convenience wrapper to source all individual configuration files. +# It also takes care of placing a custom configuration file in the appropriate +# location. + +### shellcheck ################################################################# + +# shellcheck shell=bash # no shebang as this file is intended to be sourced + +### dependencies ############################################################### + +SELF_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1; pwd) + +CUSTOM_CONFIG=$SELF_DIR/jhb-custom.conf.sh +# copy a custom configuration file to the appropriate place +if [[ $1 == *.conf.sh ]] && [ -f "$1" ]; then + cp "$1" "$CUSTOM_CONFIG" +fi + +# source a custom configuration file if present +if [ -f "$CUSTOM_CONFIG" ]; then + # shellcheck disable=SC1090 # file is optional + source "$CUSTOM_CONFIG" +fi +unset CUSTOM_CONFIG + +# source items from jhb.conf directory +for CONFIG_ITEM in $(\ + "$SELF_DIR"/../usr/bin/run-parts list "$SELF_DIR"/jhb.conf/'*.sh' \ + ); do + # shellcheck disable=SC1090 # can't point to a single source here + source "$CONFIG_ITEM" +done +unset CONFIG_ITEM + +unset SELF_DIR + +### variables ################################################################## + +# Nothing here. + +### functions ################################################################## + +# Nothing here. + +### main ####################################################################### + +# Nothing here. -- cgit v1.2.3