... | ... |
@@ -89,9 +89,11 @@ function fgfs () { |
89 | 89 |
esac |
90 | 90 |
} |
91 | 91 |
function ld_library_path () { |
92 |
- local IFS=$'\n' |
|
93 |
- for lib in $(ls -d $FGDIR/install/*/lib); do |
|
94 |
- egrep -q "(^|:)$lib(:|$)" <<< "${LD_LIBRARY_PATH}" || LD_LIBRARY_PATH="${lib}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" |
|
92 |
+ for component in $(<$fgfs_source/.flightgear); do |
|
93 |
+ if test -d $fgfs_install/$component/lib; then |
|
94 |
+ lib="$fgfs_install/$component/lib" |
|
95 |
+ egrep -q "(^|:)$lib(:|$)" <<< "${LD_LIBRARY_PATH}" || LD_LIBRARY_PATH="${lib}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" |
|
96 |
+ fi |
|
95 | 97 |
done |
96 | 98 |
export LD_LIBRARY_PATH |
97 | 99 |
} |