summaryrefslogtreecommitdiff
path: root/extra/scripts
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-01-19 03:19:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-01-19 03:19:43 +0000
commitf797eda651196af5f21474e6b69bf627be3e510e (patch)
treec1bf6aa44e2925b4f657d0130a717cd5e4d56a32 /extra/scripts
parent3456bcaecd3d83d69c4ac28c827dddef15534592 (diff)
extra/scripts/relative_path.sh: fix it
Diffstat (limited to 'extra/scripts')
-rwxr-xr-xextra/scripts/relative_path.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/scripts/relative_path.sh b/extra/scripts/relative_path.sh
index c859646a4..4dddefac1 100755
--- a/extra/scripts/relative_path.sh
+++ b/extra/scripts/relative_path.sh
@@ -33,7 +33,10 @@ case $from in
;;
esac
-prefix=`echo $from///$target | sed 's,\(\(/[^/]*\)*\).*///\1.*,\1,'`
+# Without trailing slash, from=/usr/lib and target=/uclibc/lib
+# mistakenly concludes that prefix=/u
+#prefix=`echo $from///$target | sed 's,\(\(/[^/]*\)*\).*///\1.*,\1,'`
+prefix=`echo $from///$target | sed 's,\(\(/[^/]*\)*/\).*///\1.*,\1,'`
dots=`echo $prefix | sed s,.,.,g`
from=`echo $from | sed "s,^$dots,,"`
target=`echo $target | sed "s,^$dots,,"`