[PATCH] fix wrapper script for symlinks

Bart vdr. Meulen bartvdrmeulen@gmail.com
Sun Aug 2 15:45:00 GMT 2009


# HG changeset patch
# User Bart vdr. Meulen <bartvdrmeulen@gmail.com>
# Date 1249224343 -7200
# Node ID 5820df7ee48aecf7ef7f7bb3a949ed5868e9c24b
# Parent  40e69fbd288ec6cd9bfaaee1228212c1a8169e3c
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>

---

diff -r 40e69fbd288e -r 5820df7ee48a scripts/wrapper.in
--- a/scripts/wrapper.in	Sun Aug 02 16:45:37 2009 +0200
+++ b/scripts/wrapper.in	Sun Aug 02 16:45:43 2009 +0200
@@ -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"
 



--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list