remove all unneeded slashes, not only // or ///
authorSimon Stelling <blubb@gentoo.org>
Sat, 15 Apr 2006 19:16:19 +0000 (19:16 -0000)
committerSimon Stelling <blubb@gentoo.org>
Sat, 15 Apr 2006 19:16:19 +0000 (19:16 -0000)
svn path=/main/trunk/; revision=3156

bin/ebuild.sh

index 82699119c812c54c9650d63fc9c358b6c76f1772..9d27491adde1d8b17f59132d08f9562e94e33265 100755 (executable)
@@ -411,8 +411,10 @@ unpack() {
 
 strip_duplicate_slashes () {
        if [ -n "${1}" ]; then
-               local removed="${1/\/\///}"
-               [ "${removed}" != "${removed/\/\///}" ] && removed=$(strip_duplicate_slashes "${removed}")
+               local removed=${1}
+               while [ "${removed}" != "${removed/\/\///}" ] ; do
+                       removed="${removed/\/\///}"
+               done
                echo ${removed}
        fi
 }