tools: {export,install}.sh: fix quoting issues

This commit is contained in:
Ivan Grokhotkov
2020-10-09 17:40:57 +02:00
parent 79f2e68bc0
commit a038fb24bd
2 changed files with 12 additions and 8 deletions

View File

@@ -111,16 +111,19 @@ __main() {
then
path_prefix=${PATH%%${old_path}}
# shellcheck disable=SC2169,SC2039 # unreachable with 'dash'
paths="${path_prefix//:/ }"
if [ -n "${paths}" ]; then
if [ -n "${path_prefix}" ]; then
__verbose "Added the following directories to PATH:"
else
__verbose "All paths are already set."
fi
for path_entry in ${paths}
old_ifs="$IFS"
IFS=":"
for path_entry in ${path_prefix}
do
__verbose " ${path_entry}"
done
IFS="$old_ifs"
unset old_ifs
else
__verbose "Updated PATH variable:"
__verbose " ${PATH}"