Apple Script query

Discussion in 'Mac Programming' started by philstone, Apr 1, 2011.

  1. philstone macrumors 6502


    Oct 13, 2008
    Jersey, Channel Isles
    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; ./
    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 file lives inside the package?

  2. sero macrumors member

    Aug 28, 2008
    sh ~/Desktop/
    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"

Share This Page