code-troopers / ct

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can we handle freebsd ? (or not)

mattboll opened this issue · comments

In freeBSD, bash is located at /usr/local/bin/bash so the shebang is not right.
The solutions that I see right now :

  • have a freebsd branch with just the shebang changed
  • have an installation script that could handle the shebang itself and cp the file
  • having the script as a function that we could source (but we loose the "launched in all shell" compatibility, e.g : in zsh I don't have log function so it would need two version again)
  • "osef" for 1 user that can change it himself ;)

I can patch myself, I just don't know what is the best

I would vote for the install script as it could allow to handle this kind of case easily.
It could be nice to provide such a tool for lazy users too!

Does this shebang will be the solution ?

#!/usr/bin/env bash

Yes I read that some days ago and tried it on freebsd, it works. I just didn't take time to commit. Feel free to do it ;)