Further fix bash login when ${CMDER_ROOT} has spaces.

Inspecting the script uncovers similar problems elsewhere
not encountered in my initial testing. They are fixed accordingly.
This commit is contained in:
orionlee
2016-08-20 16:01:46 -07:00
parent d095d6afd6
commit 5354b5f80f
2 changed files with 12 additions and 12 deletions

8
vendor/cmder.sh vendored
View File

@ -38,18 +38,18 @@ export PATH
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
# to source them at startup.
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
mkdir -p ${CMDER_ROOT}/config/profile.d
mkdir -p "${CMDER_ROOT}/config/profile.d"
fi
if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
unset profile_d_scripts
pushd "${CMDER_ROOT}/config/profile.d" >/dev/null
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.sh 2>/dev/null)
profile_d_scripts=$(ls *.sh 2>/dev/null)
if [ ! "x${profile_d_scripts}" = "x" ] ; then
for x in ${profile_d_scripts} ; do
# echo Sourcing "${x}"...
. $x
# echo Sourcing "${CMDER_ROOT}/config/profile.d/${x}"...
. "${CMDER_ROOT}/config/profile.d/${x}"
done
fi
popd >/dev/null