Prevent bash 2 from segfaulting when considering directories in
PATH.bashrc.
# Construct directory list, omitting nonexistent and undefined ones.
dirs=
-for dir in ${SYSTEM:-#}/${ARCHITECTURE:-#} ${SYSTEM:-} ""; do
- [ "${dir/#/}" = "$dir" ] || continue
+for dir in "${SYSTEM:-@}/${ARCHITECTURE:-@}" "${SYSTEM:-@}" ""; do
+ [ "${dir/@/}" = "$dir" ] || continue
[ -d "$DIR/$dir" ] || continue
dirs="$dirs,$DIR/$dir"
dirs="${dirs%%/}"