Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Mac platforms #52

Open
akerbos opened this issue May 5, 2015 · 3 comments
Open

Support Mac platforms #52

akerbos opened this issue May 5, 2015 · 3 comments

Comments

@akerbos
Copy link
Collaborator

akerbos commented May 5, 2015

Need to get rid of some binary GNU dependencies, provide a start script and test for "hidden" incompatibilities.

Since I don't have any Mac workstations, input and pull requests are appreciated.

@reitzig
Copy link
Owner

reitzig commented Sep 27, 2018

GNU dependencies were removed back then for #51; unclear if there's any work to do. Test on a Mac!

@samcarter
Copy link

samcarter commented May 7, 2024

ltx2any works mostly just fine on mac, the only hiccup is that the readlink version from mac doesn't know the -e option (see e.g. https://blog.game-changing.de/being-different-for-the-sake-of-being-different-subtle-differences-within-command-line-tools/ )

For my personal use, I replaced readlink with greadlink:

set -eu

script_path="$(greadlink -e "${BASH_SOURCE[0]}")"

ruby "$(dirname "${script_path}")/ltx2any.rb" "$@"

(no idea if there is a better solution)

tested with:

  • macOS 14.5.1
  • ruby 3.3.1 installed via homebrew
  • greadlink 9.5 also installed via homebrew

@reitzig
Copy link
Owner

reitzig commented Jun 2, 2024

Thanks, hope that helps future visitors!

Alternatives I can think of:

  • Somewhere on the PATH, put your own shell script that explicitly calls ruby /your/path/to/ltx2any.rb "${@}".
  • Add shebang #!/usr/bin/env ruby to ltx2any.rb and symlink it directly, avoiding the intermediate shell script.
    ⚠️ Requires dependencies to be installed at system level (don't understand why, won't investigate) -- can't recommend!
  • IIRC: Transform macOS into a (somewhat) usable system by brew install coreutils 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants