Make shell script executable in Mac os x without entering the terminal

I have a client that has a mac os x leopard (10.5). I want to be able to ask him to save a shell script that I made in his desktop and execute it, but I can't open the terminal without the client thinking that I'm trying to destroy his computer. :-(

Is there any way I can make the shell executable without entering the terminal and using chmod?

Thanks, Rafael

4

4 Answers

Make an Automator executable or AppleScript that performs the desired command-line actions.


AppleScript:

tell application "Terminal" to do shell script "chmod u+x ~/path"

Terminal will start, but not open a new window.


Automator:

  1. Get ... Finder Items
  2. Run Shell Script with Pass input as arguments and chmod u+x $1

Go the easy route:

"Platypus can be used to create native, flawlessly integrated Mac OS X applications from interpreted scripts such as shell scripts or Perl and Python programs. This is done by wrapping the script in an application bundle directory structure along with an executable binary that runs the script."

Hope that helps!

Have a wonderful day.

~ tim

Try changing the extension on the script to

.command

That should make it a clickable item in Finder.

2

You can store it into a tar.gz file and unpack it and run it... =)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like