Making a script clickable

Making a script clickable #

This is primarily for Mac.

At the top of the file, add:

#!/bin/bash
cd -- "$(dirname "$BASH_SOURCE")"

Beneath that, populate the file with whatever script you want to run.

After that, make the file executable:

chmod u+x <filename>

Tada! That’s it. When you double click the script file, it should pop up a terminal and execute the script.