bash-script-compiler/src/functions/compile_readVariables.sh

16 lines
490 B
Bash
Raw Normal View History

2024-03-29 13:01:40 +01:00
function compile_readVariables() {
local directory="$TARGET_PATH"
# read VARIABLES
if [ -f ./VARIABLES ]; then
source VARIABLES
#echo "DEBUG: Found variables file, setting: `cat VARIABLES`"
fi
if [ -n $BASH_SCRIPT_COMPILER_SCRIPT_NAME ]; then
pushd .. >/dev/null 2>&1
BASH_SCRIPT_COMPILER_SCRIPT_NAME=$(basename "$(pwd)")
popd >/dev/null 2>&1
echo "BASH_SCRIPT_COMPILER_SCRIPT_NAME was not set, setting to: $BASH_SCRIPT_COMPILER_SCRIPT_NAME"
fi
}