By Manny Fernandez

January 28, 2020

Creating an .app out of a Script on macOS

Since I am on my backup laptop due to my primary laptop having the keyboard replaced, I wanted to make it easy to launch Unetbootin from my Spotlight as a .app.  Found a nice little app in the AppStore that does just that.  In this example, I will do a quick ls script.

2020-01-20_19-44-53.png

ScriptToApp – App Maker is available in the AppStore and the cost is $2.99

I created a bash script to do a simple ls and display the results.

2020-01-28_15-05-12.png

#!/bin/bash
ls -all

You will need to make it executable

2020-01-28_15-08-16.png

chmod +x test.sh

As you can see, prior to running the chmod command, you did not have an x in the rights section.  Additionally, you can see that the test.sh file name is now red.  I wrote an article on how to add color to your ls command.

Launch the ScriptToApp Application

2020-01-20_19-59-19.png

Drag the script file from the folder

2020-01-28_15-12-50.png

Once you drag it on the app, you should get a pop-up

2020-01-28_15-13-23.png

Ensure all the settings are as you want including the name of the .app and click Create App

2020-01-28_15-18-36.png

You can always launch the script through the Spotlight search bar, but this makes it cleaner.  You can see the ls that ran.

 

 

 

Recent posts

  • There are many options when troubleshooting in FortiGate firewalls. ... Full Story

  • Have you ever had an IPS signature that continues... Full Story

  • Use case:  Customer has a Split Tunnel Enabled but... Full Story