From: Simon Stelling Date: Sat, 15 Apr 2006 19:16:19 +0000 (-0000) Subject: remove all unneeded slashes, not only // or /// X-Git-Tag: v2.1_pre9~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f2f546e5e18ef1684def5c2f4a6528d665ff8dd0;p=portage.git remove all unneeded slashes, not only // or /// svn path=/main/trunk/; revision=3156 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 82699119c..9d27491ad 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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 }