- 
        Couldn't load subscription status. 
- Fork 78
Closed
Description
The resolve_link functions do not work on Alpine / Busybox (Alpine uses Busybox), because
Busybox's realpath has no option at all and its readlink just has the following (not -e):
BusyBox v1.28.4 (2018-07-17 15:21:40 UTC) multi-call binary.
Usage: readlink [-fnv] FILE
Display the value of a symlink
	-f	Canonicalize by following all symlinks
	-n	Don't add newline
	-v	Verbose
So I guess we'll have complexify the function a bit. Also I noticed you did not update the resolve_link function in basher, it still uses greadlink.
Here is a first draft:
resolve_link() {
  if type -p realpath >/dev/null; then
    realpath "$1"
  elif type -p readlink >/dev/null; then
    readlink -f "$1"
    # -e is actually not mandatory for our use-case, but -f is, to resolve . and ..
  # else ??
  fi
}Metadata
Metadata
Assignees
Labels
No labels