use strip_duplicate_slashes instead of "for 1 2 3 do var=${var/\/\///}"
authorSimon Stelling <blubb@gentoo.org>
Sat, 15 Apr 2006 19:23:03 +0000 (19:23 -0000)
committerSimon Stelling <blubb@gentoo.org>
Sat, 15 Apr 2006 19:23:03 +0000 (19:23 -0000)
svn path=/main/trunk/; revision=3157

bin/ebuild.sh

index 9d27491adde1d8b17f59132d08f9562e94e33265..f54110273baadb53d5da281050afae8bb4bc4ece 100755 (executable)
@@ -466,11 +466,7 @@ econf() {
                        export CONF_PREFIX
                        [ "${CONF_LIBDIR:0:1}" != "/" ] && CONF_LIBDIR="/${CONF_LIBDIR}"
 
-                       CONF_LIBDIR_RESULT="${CONF_PREFIX}${CONF_LIBDIR}"
-                       for x in 1 2 3; do
-                               # The escaping is weird. It will break if you escape the last one.
-                               CONF_LIBDIR_RESULT="${CONF_LIBDIR_RESULT//\/\///}"
-                       done
+                       CONF_LIBDIR_RESULT="$(strip_duplicate_slashes ${CONF_PREFIX}${CONF_LIBDIR})"
 
                        LOCAL_EXTRA_ECONF="--libdir=${CONF_LIBDIR_RESULT} ${LOCAL_EXTRA_ECONF}"
                fi