Closed matthewwiese closed 6 years ago
The error seems unnecessarily heavyhanded. All that case
block is doing is installing Racket and rlwrap. Can you try installing Racket, then commenting out the error message and exit, then running it from the top-level directory for Anarki? Instead, make it look like this:
*)
arc_dir=$(pwd)
You may still run into issues. The error above about [[: not found
suggests that you may need to explicitly install bash.
Thank you for the assistance akkartik. The [[: not found
error didn't immediately occur to me to be a shell error. Will try to figure that issue out (as I do have bash installed and running).
Should your change to the catchall be added to the repository? From your comment it sounds like your fix should be the default for users.
Yes, once you can confirm you get it working I'll send you a PR.
Hey @akkartik I made the change and everything works fine when I run bash arc.sh
!
The only problem is to execute ./arc.sh
directly I have to change the first line to #!/usr/local/bin/bash
but that's just because I have it installed there on my system. My suggestion is to make it more explicit in the README for users of other Unix variants -- perhaps a little blurb much like your comment to me telling users to make sure they are using the correct shell and that it's assumed bash is located at /bin/bash
?
Awesome! Does FreeBSD have /usr/bin/env
?
Yes it does! I see where you're going with this... change the shebang to #!/usr/bin/env bash
?
Thanks for https://github.com/arclanguage/anarki/pull/97!
A coda on "standard paths":
/usr/bin/zsh
, only /bin/zsh
./bin/zsh
, only /usr/bin/zsh
./bin/bash
, only /usr/local/bin/bash
.Looks like POSIX is silent on where utilities should be located. (Though perhaps it wasn't always thus?)
Everyone has /usr/bin/env
, but that's considered insecure. What is a sophont to do?
When I run
sh arc.sh
in the anarki repository, the script does not run and I am greeted with the message:arc.sh: [[: not found
Sorry, this script doesn't run on your platform FreeBSD yet. Please create a new issue at https://github.com/arclanguage/anarki/issues.
I'm fairly new to FreeBSD so perhaps this is a vanilla response. Nevertheless, I'm not entirely sure how to get it working myself.EDIT: Just checked the arc.sh file and realized that this is a message from the script, not my system.