Running a script after IDE build

Im trying to run a shell script after the IDE has built an app (the script copies my files up to an online server)

I add a new build step script with the following

DoShellCommand(“sh -c /pathoffile/updatescript.sh”)

it has all the correct permissions but i get a

compile error [24]

Anyone any ideas?

DoShellCommand returns a String.

Dim results As String results = DoShellCommand("sh -c /pathoffile/updatescript.sh")

Shell is not the same as a terminal session and likely doesn’t have the environment you expect. You may need to specify the path to your home directory.

I’d start by calling “env” to get a list of environment vars that it does know about and compare the list to what you get when entering env in a terminal window.

Not tested (and it may have typos)… but what about something like this?

Dim results As String results = DoShellCommand( "osascript -e 'tell application ""Terminal"" to do script ""sh -c /pathoffile/updatescript.sh"" ' " )
This should open Terminal.app and execute your script.