Browse Source

extra/scripts/relative_path.sh: fix it

Denis Vlasenko 15 years ago
parent
commit
f797eda651
1 changed files with 4 additions and 1 deletions
  1. 4 1
      extra/scripts/relative_path.sh

+ 4 - 1
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,,"`