Support symlinks in the jd-cli wrapper
cutephoton opened this issue · comments
Consider modifying the startup script (jd-cli) to use this instead:
DIR=$( dirname $( readlink -f ${BASH_SOURCE[0]} ))
Because it works with symlinks.
Where does that script come from anyway? I don't see it in the repository.
Found it, https://github.com/kwart/jd-cmd/blob/master/jd-cli/src/main/bin/jd-cli
Consider modifying the startup script (jd-cli) to use this instead:
DIR=$( dirname $( readlink -f ${BASH_SOURCE[0]} ))
Because it works with symlinks.
This is not POSIX-compliant, (See: https://stackoverflow.com/a/29835459/8507637).
POSIX can be really limiting, eh? sigh I think readlink -e path
might be a compromise since it's generally available. It's not shell specific. Do you see a better option?