Lines 432-437
Link Here
|
432 |
# Function: traverse_profile {{{ |
432 |
# Function: traverse_profile {{{ |
433 |
# General method of collecting the contents of a profile |
433 |
# General method of collecting the contents of a profile |
434 |
# component by traversing through the cascading profile |
434 |
# component by traversing through the cascading profile |
|
|
435 |
# Bug 315037: Handle special characters in profile path(s) |
435 |
# |
436 |
# |
436 |
# Arguments: |
437 |
# Arguments: |
437 |
# $1 - Filename (make.profile) |
438 |
# $1 - Filename (make.profile) |
Lines 441-458
Link Here
|
441 |
local parent |
442 |
local parent |
442 |
local rvalue="" |
443 |
local rvalue="" |
443 |
|
444 |
|
444 |
curdir="${2:-$(get_real_path ${MAKE_PROFILE_PATH})}" |
445 |
curdir="${2:-$(get_real_path "${MAKE_PROFILE_PATH}")}" |
445 |
|
446 |
|
446 |
[[ -f "${curdir}/${1}" ]] && rvalue="${curdir}/${1} ${rvalue}" |
447 |
[[ -f "${curdir}/${1}" ]] && rvalue="${curdir}/${1} ${rvalue}" |
447 |
if [[ -f "${curdir}/parent" ]]; then |
448 |
if [[ -f "${curdir}/parent" ]]; then |
448 |
for parent in $(egrep -v '(^#|^ *$)' ${curdir}/parent); do |
449 |
for parent in $(egrep -v '(^#|^ *$)' "${curdir}"/parent); do |
449 |
# Bug 231394, handle parent path being absolute |
450 |
# Bug 231394, handle parent path being absolute |
450 |
if [[ ${parent:0:1} == "/" ]]; then |
451 |
if [[ ${parent:0:1} == "/" ]]; then |
451 |
pdir="$(get_real_path ${parent})" |
452 |
pdir="$(get_real_path "${parent}")" |
452 |
else |
453 |
else |
453 |
pdir="$(get_real_path ${curdir}/${parent})" |
454 |
pdir="$(get_real_path "${curdir}/${parent}")" |
454 |
fi |
455 |
fi |
455 |
rvalue="$(traverse_profile ${1} ${pdir}) ${rvalue}" |
456 |
rvalue="$(traverse_profile "${1}" "${pdir}") ${rvalue}" |
456 |
done |
457 |
done |
457 |
fi |
458 |
fi |
458 |
|
459 |
|