_realcommand: Try greadlink before readlink (Alioth: #313659).
Some systems' readlink does not have -f, but may have the GNU readlink which does installed as greadlink.master
parent
739c6d2833
commit
32f223963a
|
@ -1274,6 +1274,8 @@ _realcommand()
|
|||
type -P "$1" > /dev/null && {
|
||||
if type -p realpath > /dev/null; then
|
||||
realpath "$(type -P "$1")"
|
||||
elif type -p greadlink > /dev/null; then
|
||||
greadlink -f "$(type -P "$1")"
|
||||
elif type -p readlink > /dev/null; then
|
||||
readlink -f "$(type -P "$1")"
|
||||
else
|
||||
|
|
|
@ -799,6 +799,8 @@ proc realcommand {cmd} {
|
|||
if [string length [set path [auto_execok $cmd]]] {
|
||||
if {[string length [auto_execok realpath]]} {
|
||||
set result [exec realpath $path]
|
||||
} elseif {[string length [auto_execok greadlink]]} {
|
||||
set result [exec greadlink -f $path]
|
||||
} elseif {[string length [auto_execok readlink]]} {
|
||||
set result [exec readlink -f $path]
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue