Make Bash Script Executable App on MacOS
Double click to execute script
WARNING: Test before converting 😁
Double click to execute script
WARNING: Test before converting 😁
This process converts your bash executable into a desktop application (a GUI icon) that you can double click and launch/execute. There's lots of bash scripts that I create and I don't want to open the terminal to run them. Besides, if you do run it in a terminal, the MacOS won't close the terminal application without you manually quitting.
Create and save a Bash script
echo '#!/bin/bash' > ~/Desktop/myscript.sh
echo 'echo "Hello, World!"' >> ~/Desktop/myscript.sh
chmod +x ~/Desktop/myscript.sh
Create the AppleScript
do shell script "/Users/yourusername/Desktop/myscript.sh"
Replace /Users/yourusername/Desktop/myscript.sh with the actual path to your script.Save the AppleScript
Grant Permissions