if [ "$(uname -s)" == "Linux” ]; then
stuff-goes-here
else # Assume MacOS
While probably true for most folks, that’s hardly what I’d call great for everybody not on Linux or a Mac. if [ "$(uname -s)" == "Linux” ]; then
stuff-goes-here
else # Assume MacOS
While probably true for most folks, that’s hardly what I’d call great for everybody not on Linux or a Mac.Though for that snippet I would argue for testing for the command rather than the OS (unless Macs or some other common arrangement has something incompatible in the standard path with the same command name?).
That said, I’ve never used any of the BSDs, so I may be way off here.