guarinogabriel / Mac-CLI

 macOS command line tool for developers – The ultimate tool to manage your Mac. It provides a huge set of command line commands that automatize the usage of your Mac.
MIT License
8.86k stars 334 forks source link

fix: Run with `bash` instead of `sh` #195

Closed hyperupcall closed 5 months ago

hyperupcall commented 7 months ago

I noticed that the mac file had the shebang of !/bin/sh. While this works in some places, it does break on Linux distributions that use dash as sh instead of Bash. For example, on my computer:

$ ./mac
./mac: 28: Bad substitution

This is because mac uses a lot of convenient Bashisms. I changed the shebang to execute bash. Insted of executing it directly, I used /usr/bin/env so it would work on more systems, such as NixoOS and OpenBSD (and in some cases, macOS).

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hyperupcall commented 5 months ago

@guarinogabriel