projects
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
23702c5
)
Resolve symlinks only when it is necessary
author
Natanael Copa
<ncopa@alpinelinux.org>
Wed, 29 Feb 2012 13:20:40 +0000 (14:20 +0100)
committer
Daniel Hokka Zakrisson
<daniel@hozac.com>
Wed, 29 Feb 2012 13:25:07 +0000 (14:25 +0100)
m4/ensc_pathprog.m4
patch
|
blob
|
history
diff --git
a/m4/ensc_pathprog.m4
b/m4/ensc_pathprog.m4
index
1678a74
..
cd99634
100644
(file)
--- a/
m4/ensc_pathprog.m4
+++ b/
m4/ensc_pathprog.m4
@@
-60,9
+60,13
@@
$4])
fi
if test "x$5" = x; then
- if test -h "${$1}"; then
- $1=`readlink -f "${$1}"`
- fi
+ ensc_pathprog_path="${$1}"
+ while test -h "$ensc_pathprog_path"; do
+ case "$ensc_pathprog_path" in
+ ../*) $1=`readlink -f "${$1}"`; break ;;
+ esac
+ ensc_pathprog_path=`readlink "$ensc_pathprog_path"`
+ done
fi
test "${$1}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'$1'@!${$1}!g;"