Skip to content

butch scripts use readlink -f which is not posix #575

@rofl0r

Description

@rofl0r

... so it may currently not be used on Mac OS X, and maybe some BSDs...

TODO: find portable way to achieve the same

readlink_f() {
readlink "$1" || printf "%s\n" "$1" | sed -e 's,\\,/,g'
}

this possible candidate works for the cases where readlink doesn't return anything, and the program is in $PATH, but not for the case of relative symlinks: e.g.

$ readlink /bin/butch
../opt/sabotage-core/bin/butch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions