Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Deep_Thought

macrumors 6502
Original poster
Oct 13, 2008
446
31
Hi All,


I have a few terminal commands that I want to package up into an app - nothing fancy or clever, just to change permissions on a .sh file then execute it..
I've read that Apple Script editor will let me do this then save as an app - is this right?

I've so far got (taking into account the .sh will be on the desktop)

tell application "Terminal"
do script with command "cd /Users/<username>/Desktop; ./install.sh
end tell

In terminal I'd normally do chmod +x on the file first... (using Sudo) - how can I add that into the app?

My next question will be how can I make this an all in one .app so that the install.sh file lives inside the package?

Thanks!
Phil
 

sero

macrumors member
Aug 28, 2008
91
14
Code:
#!/bin/bash
sh ~/Desktop/install.sh
exit 1

save it was whatever.command, and make that file executable. Should work I believe...

No idea what you're after with putting the install script "inside the package"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.