Lines 673-695
Link Here
|
673 |
fi |
673 |
fi |
674 |
} |
674 |
} |
675 |
parse_ld_so_conf() { |
675 |
parse_ld_so_conf() { |
676 |
# FIXME: not safe for paths with spaces |
676 |
local line |
677 |
local include |
677 |
local inc_line |
678 |
for path in $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf); do |
678 |
while read line; do |
679 |
if [[ $include = true ]]; then |
679 |
if echo "$line" | grep -q "^include\>"; then |
680 |
for include_path in $(sed '/^#/d;s/#.*$//' /etc/${path} 2>/dev/null); do |
680 |
line=$(echo "$line" | sed 's/^include[[:space:]]\+//') |
681 |
echo $include_path |
681 |
for inc_line in $(sed '/^#/d;s/#.*$//' /etc/${line}); do |
|
|
682 |
echo "$inc_line" |
682 |
done |
683 |
done |
683 |
include="" |
|
|
684 |
continue |
685 |
fi |
686 |
if [[ $path != include ]]; then |
687 |
echo $path |
688 |
else |
684 |
else |
689 |
include="true" |
685 |
echo "$line" |
690 |
continue |
|
|
691 |
fi |
686 |
fi |
692 |
done |
687 |
done < <(sed '/^#/d;s/#.*$//' /etc/ld.so.conf) |
693 |
} |
688 |
} |
694 |
get_ldpath() { |
689 |
get_ldpath() { |
695 |
local COMPLETE_LD_LIBRARY_PATH |
690 |
local COMPLETE_LD_LIBRARY_PATH |