fix wrapper script for symlinks
authorBart vdr. Meulen <bartvdrmeulen@gmail.com>
Sun Aug 02 16:45:43 2009 +0200 (2009-08-02)
changeset 14347e7290acccc1
parent 1433 f04c7879f3c2
child 1443 ffe807a86288
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>

---
scripts/wrapper.in
     1.1 --- a/scripts/wrapper.in	Sun Aug 02 16:45:33 2009 +0200
     1.2 +++ b/scripts/wrapper.in	Sun Aug 02 16:45:43 2009 +0200
     1.3 @@ -1,7 +1,8 @@
     1.4  #!/bin/sh
     1.5  
     1.6 -dirname="$(dirname "${0}")"
     1.7 -basename="$(basename "${0}")"
     1.8 +canonicalizedname=$(readlink -nm "${0}")
     1.9 +dirname="$(dirname "${canonicalizedname}")"
    1.10 +basename="$(basename "${canonicalizedname}")"
    1.11  
    1.12  ld_lib_path="$(dirname "${dirname}")/lib"
    1.13