symlink problems with mac os
Accidentally posted this on the mailing list. Should belong here.
on macOS High Sierra (10.13) the kawa bash script does’t work with symbolic links.
Steps to reproduce:
-
Download and extract kawa-3.0.zip to a folder $KAWA_HOME
-
Open a terminal, create a symlink, execute symlink
$ ln -s $KAWA_HOME/bin/kawa kawa $ ./kawa readlink: illegal option — f usage: readlink [-n] [file …] Error: Could not find or load main class kawa.repl
Cause:
The readlink version of macOS isn’t the same as GNU/Linux one. The latter version does follow symlinks with -f. The macOS one does not support this feature.
I stumbled upon this while working on a port for MacPorts Should make kawa easier to install and upgrade on macOS. (Of course it is already simple enough being a jar file and such…)
Found a related discussion on SO.