summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-30 07:23:53 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-30 07:23:53 -0700
commit94b297d1040bb956442ba44de1a9afe5ecb6c8e7 (patch)
treea56b863afe664dadc35e903c7aea9f027be2b7eb
parent3b398083f281aff5de39e134903029b1ca2e3c9b (diff)
parentbb2a3affe726d41a8a045c76c81d08b331bd16c4 (diff)
downloadportage-94b297d1040bb956442ba44de1a9afe5ecb6c8e7.tar.gz
portage-94b297d1040bb956442ba44de1a9afe5ecb6c8e7.tar.bz2
portage-94b297d1040bb956442ba44de1a9afe5ecb6c8e7.zip
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/portage
-rwxr-xr-xbin/misc-functions.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 6f3604d0a..d7e0f5688 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -43,10 +43,10 @@ install_symlink_html_docs() {
# replacement for "readlink -f" or "realpath"
canonicalize() {
local f=$1 b n=10 wd=$(pwd)
- while [[ ${f: -1} = / && ${#f} -gt 1 ]]; do
- f=${f%/}
- done
while (( n-- > 0 )); do
+ while [[ ${f: -1} = / && ${#f} -gt 1 ]]; do
+ f=${f%/}
+ done
b=${f##*/}
cd "${f%"${b}"}" 2>/dev/null || break
if [[ ! -L ${b} ]]; then