From f797eda651196af5f21474e6b69bf627be3e510e Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 19 Jan 2009 03:19:43 +0000 Subject: extra/scripts/relative_path.sh: fix it --- extra/scripts/relative_path.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extra') 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,,"` -- cgit v1.2.3