aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart vdr. Meulen <bartvdrmeulen@gmail.com>2009-08-02 16:45:43 +0200
committerBart vdr. Meulen <bartvdrmeulen@gmail.com>2009-08-02 16:45:43 +0200
commit7c3dcb42dc4d7f2e3adeb40f954ee94ef1afa7ee (patch)
treedf2fde8a55dae43fce87662fe04da6d154ec5b4d
parenta183b3f8bcdafe722a6232b9ea10c4951d6e588e (diff)
downloadcrosstool-ng-7c3dcb42dc4d7f2e3adeb40f954ee94ef1afa7ee.tar.gz
crosstool-ng-7c3dcb42dc4d7f2e3adeb40f954ee94ef1afa7ee.tar.bz2
crosstool-ng-7c3dcb42dc4d7f2e3adeb40f954ee94ef1afa7ee.zip
fix wrapper script for symlinks
The wrapper script placed around the target binaries when using the companion libraries does not work for symbolic links The wrapper scripts needs to follow the links before calling the actual binary Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> ---
-rw-r--r--scripts/wrapper.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/wrapper.in b/scripts/wrapper.in
index 6222333d..1c501ebf 100644
--- a/scripts/wrapper.in
+++ b/scripts/wrapper.in
@@ -1,7 +1,8 @@
#!/bin/sh
-dirname="$(dirname "${0}")"
-basename="$(basename "${0}")"
+canonicalizedname=$(readlink -nm "${0}")
+dirname="$(dirname "${canonicalizedname}")"
+basename="$(basename "${canonicalizedname}")"
ld_lib_path="$(dirname "${dirname}")/lib"