I use Clojure on a variety of platforms, including FreeBSD. Which is fine as a rule, but it can be tricky to install. There is a port/package, but it's often agreeable to get the latest version by installing directly, as clojure.org suggests.
It would be nice to see https://clojure.org/guides/install_clojure mention BSD, but at the very least, the Linux script could be made secretly compatible. It currently relies on GNU's version of /usr/bin/install
, but not for any apparent reason. Dropping the -D
argument in favor of mkdir -p
is all it would take to make it work with BSD's install
as well:
https://git.sr.ht/~psagers/clj-install/commit/1c93681457dbc34b578869f9f422645809b8951d
Of course, as long as we have the file open, it's worth noting how straightforward it is: it doesn't actually rely on bash
or install
in any meaningful way. One more pass can dispense with the recreational dependencies and turn it into the pure POSIX shell script that it's clearly yearning to be:
https://git.sr.ht/~psagers/clj-install/commit/0b2805c242d9cffe9387b1b3213ab86041cea1df
Less is definitely more in this case. The repo I'm linking to also has a Vagrantfile that runs the script against Debian and FreeBSD machines and checks for a working install.
Thanks,
Peter