Orange-OpenSource / conllueditor

ConllEditor is a tool to edit dependency syntax trees in CoNLL-U format.
BSD 3-Clause "New" or "Revised" License
54 stars 17 forks source link

Issue with readLink in conlluedit.sh on Mac #3

Closed JPJPJPOPOP closed 3 years ago

JPJPJPOPOP commented 4 years ago

Running bin/conlluedit.sh -r treebank.conllu 8888 on macOS version 10.14.6 gives me the following error:

readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
ls: /../target/ConlluEditor-*: No such file or directory
jar: 
Unrecognized option: --rootdir
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I found a fix for it by installing coreutils (brew install coreutils) and changing line 6 of conlluedit.sh to BASENAME=$(dirname $(greadlink -f $0)). It seems like readlink does not have the -f option on mac.

jheinecke commented 4 years ago

Thanks for this info. I did not realise that readlink does not have the option -f on Mac. greadlink on the other hand does not seem to be available on Linux. There is also readpath (on Linux), but once again I do not have access to a Mac for the time being, so could you confirm whether it is available on Mac?