views:

40

answers:

2

Hello ,

I have seen that i can use chmod +x command in Mac to make a shell script executable. This works fine, but i have noticed that i have to do the same thing every time this shell script file is copied to another Mac computer.

Is there a way to make the shell script executable by default when double clicked, without such command ... As the shell script file will be given to many users, and doing this will be hard for some of them ?

Best regards.

A: 

Give it the '.command' extension and it can be executed from the Finder.

Graham Perks
@Graham ... I am already doing so, but it does not execute by default. It shows message: "The file could not be executed because you do not have appropriate access privileges"
Brad
+1  A: 

If you pack your whole program in a .tar file (or in a .tar.gz-file, which is the same, but compressed), the executable-"permission" will be preserved.

thejh