From 70effbe19e6c95eee21db8d164c65e8bcd90cde2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 15 Apr 2006 19:29:52 +0000 Subject: touchup syntax and dont execute the loop as many times svn path=/main/trunk/; revision=3158 --- bin/ebuild.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index f54110273..3babf1d46 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -409,11 +409,11 @@ unpack() { chmod -Rf a+rX,u+w,g-w,o-w . } -strip_duplicate_slashes () { - if [ -n "${1}" ]; then - local removed=${1} - while [ "${removed}" != "${removed/\/\///}" ] ; do - removed="${removed/\/\///}" +strip_duplicate_slashes() { + if [[ -n $1 ]] ; then + local removed=$1 + while [[ ${removed} == *//* ]] ; do + removed=${removed//\/\///} done echo ${removed} fi -- cgit v1.2.3-1-g7c22