dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.62k stars 67 forks source link

`closh.sh` doesn't work on macOS #52

Closed mnewt closed 6 years ago

mnewt commented 6 years ago

closh.sh uses two features that just about every Unix-like has, but not macOS:

> bin/closh.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
bin/closh.sh: line 10: realpath: command not found
usage: dirname path
usage: dirname path
bin/closh.sh: line 15: /lumo: No such file or directory
bin/closh.sh: line 15: exec: /lumo: cannot execute: No such file or directory

The solution needs to do the same thing with only POSIX tools. A refactor shouldn't be too terrible although it might be harder to cover edge cases. While we're at it, a test or two would probably be good.

I'll send a pull request when I get the chance.

domparry commented 6 years ago

Thank you!

dundalek commented 6 years ago

Using a shell bootstrapping is an intermediate hack before I am able to compile closh as a single binary. After that it will no longer be needed. So if it is easy, it would be nice so that the latest version runs for people on Mac. Thanks @mnewt

mnewt commented 6 years ago

Ok, was going to ask about this. I’ll hold off if you think the nexe packaging will work. It’s not too much work but the more crude posix tools make more potential edge cases which need to be handled.

On Feb 22, 2018, at 11:14 AM, Jakub Dundalek notifications@github.com wrote:

Using a shell bootstrapping is an intermediate hack before I am able to compile closh as a single binary. After that it will no longer be needed. So if it is easy, it would be nice so that the latest version runs for people on Mac. Thanks @mnewt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

dundalek commented 6 years ago

@mnewt I tried to move forward on the single binary build, but I finally give up. I keep running into a non-ending stream of issues. So I will wait for this until the ecosystem matures a bit or another opportunity presents itself. For example there have been some developments on the clj CLI tool recently which may end up being useful.

In the mean time I will proclaim Windows non-supported with a call for help. If you could port the startup script or find another way how to run on macOS I would be grateful.

mnewt commented 6 years ago

Fixed in commit cde9406