Launch a bash script from the dock
I can't seem to figure this one out, there must be some really easy trick.
I have a bash script which sets my environment for an app and launches it with the correct parameters. How can I put this script (or any script) on the dock?
Thanks,
Solution 1:
Automator can be used to create an application "wrapper" around a script, so that you can launch your script like any other application (and it won't spawn a superfluous Terminal window in the process).
- Open Automator, and create a new application type workflow.
- Add a Run Shell Script action, and enter your script into the text field.
- If your script takes input (such as files), make sure the Pass input setting on the action is set appropriately (either arguments, if you use
$1, $2, etc.
or stdin). Otherwise you can ignore this setting. - Save the workflow to your location of choice, then drop the resulting file in the Dock.