owlcollab / owltools

OWLTools
BSD 3-Clause "New" or "Revised" License
108 stars 33 forks source link

Bash fixes for Mac (10.12) compatibility #250

Open safisher opened 6 years ago

safisher commented 6 years ago

I was unable to run owltools on the Mac (OS X 10.12). The following changes were required.

Note that I did not test this on any other systems but I added a test to the script see if it's running on a Mac and if so then the following changes are implemented. If not running on a Mac then there should be no change in behavior.

  1. Need double quotes around $0.
  2. Need to include jar files in class path.
  3. Used MY_DIR instead of PATH_TO_SELF in classpath.
safisher commented 6 years ago

Apparently this fix is specific to the case where the owltools script has a path that contains spaces. For example "/Users/Bob/My Scripts/owltools". If the path to owltools does not contain spaces then this fix is not necessary.