Skip to content

Commit 802153d

Browse files
committed
set LD_LIBRARY_PATH explicitly from RPATH, if found
1 parent f555906 commit 802153d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/examples/start.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@ if test -n "$RT_BINDIR"; then
4242
fi
4343
#RT_BINDIR="$HOME/src/rtorrent-ps/rtorrent-0.9.6/src/"
4444
export RT_BIN="${RT_BINDIR}rtorrent"
45+
46+
if which objdump >/dev/null; then
47+
RUNPATH=$(objdump -x "$RT_BIN" | grep RPATH | sed -re 's/ *RPATH *//')
48+
test -z "$RUNPATH" || LD_LIBRARY_PATH="$RUNPATH${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
49+
fi
50+
4551
"$RT_BIN" "${RT_OPTS[@]}"

0 commit comments

Comments
 (0)