2 SOURCE
="${BASH_SOURCE[0]}"
3 while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
4 DIR
="$( cd -P "$
( dirname "$SOURCE" )" && pwd )"
5 SOURCE
="$(readlink "$SOURCE")"
6 [[ $SOURCE != /* ]] && SOURCE
="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
8 DIR
="$( cd -P "$
( dirname "$SOURCE" )" && pwd )"
9 export LD_LIBARY_PATH
=$DIR/..
/lib
:$LD_LIBRARY_PATH