projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9c6c87
)
Bug fix in canonicalize() function.
author
Ulrich Mueller
<ulm@gentoo.org>
Mon, 30 Aug 2010 12:35:32 +0000
(14:35 +0200)
committer
Ulrich Mueller
<ulm@gentoo.org>
Mon, 30 Aug 2010 13:23:34 +0000
(15:23 +0200)
bin/misc-functions.sh
patch
|
blob
|
history
diff --git
a/bin/misc-functions.sh
b/bin/misc-functions.sh
index 6f3604d0a16d87691fc08a3902285fcf90fedae1..d7e0f568837ea9d3ff761149b97ba299be404a97 100755
(executable)
--- 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