mkropat / sh-realpath

A portable, pure shell implementation of realpath
MIT License
91 stars 17 forks source link

readlink(1) does not exist on Solaris #1

Open mkropat opened 10 years ago

mkropat commented 10 years ago

Reference: Solaris User Commands

It would be nice to have a workaround included. The algorithm might look like:

if has_command readlink; then
    realpath_readlink() { <wrap readlink>; }
elsif has_command greadlink; then
    realpath_readlink() { <wrap greadlink>; }
else
    realpath_readlink() { <wrap ls -l>; }
fi