refer to user variable, not internal variable in error message

This commit is contained in:
2019-12-13 14:58:57 +01:00
parent c7aca7cd73
commit 487d8eb287
2 changed files with 4 additions and 6 deletions

View File

@@ -7,8 +7,6 @@ set -e
# Perl version of "readlink -f" (which MacOS does not provide) # Perl version of "readlink -f" (which MacOS does not provide)
readlinkf() { perl -MCwd -e 'print Cwd::abs_path shift' "$1"; } readlinkf() { perl -MCwd -e 'print Cwd::abs_path shift' "$1"; }
SETUP_DIRS=$(echo $SETUP_PATH | tr ":" "\n")
SCRIPTDIR=$(dirname $(readlinkf $0)) SCRIPTDIR=$(dirname $(readlinkf $0))
CURDIR="$PWD" CURDIR="$PWD"
CACHEDIR="$HOME/.cache" CACHEDIR="$HOME/.cache"

View File

@@ -36,15 +36,15 @@ die() {
# source_set(settings) # source_set(settings)
# #
# Source a settings file (extension .set) found in the SETUP_DIRS path # Source a settings file (extension .set) found in SETUP_PATH
# May be called recursively (from within a settings file) # May be called recursively (from within a settings file)
declare -a SEEN_SETUPS declare -a SEEN_SETUPS
source_set() { source_set() {
local set_file=${1//[$'\r']} local set_file=${1//[$'\r']}
local set_dir local set_dir
local found=0 local found=0
[ "${SETUP_DIRS}" ] || die "Search path for setup files (SETUP_PATH) is empty" [ "${SETUP_PATH}" ] || die "Search path for setup files (SETUP_PATH) is empty"
for set_dir in ${SETUP_DIRS} for set_dir in $(echo $SETUP_PATH | tr ":" "\n")
do do
if [ -e $set_dir/$set_file.set ] if [ -e $set_dir/$set_file.set ]
then then
@@ -76,7 +76,7 @@ source_set() {
break break
fi fi
done done
[ $found -ne 0 ] || die "Setup file $set_file.set does not exist in SETUP_DIRS search path ($SETUP_DIRS)" [ $found -ne 0 ] || die "Setup file $set_file.set does not exist in SETUP_PATH search path ($SETUP_PATH)"
} }
# update_release_local(varname, place) # update_release_local(varname, place)