Re: Strip not working
Re: Strip not working
- Subject: Re: Strip not working
- From: Chris Espinosa <email@hidden>
- Date: Sun, 10 Dec 2006 09:19:31 -0800
On Dec 10, 2006, at 9:08 AM, Derek Wyatt wrote: On 10-Dec-06, at 10:47 AM, James Bucanek wrote:
Trygve Inda wrote on Sunday, December 10, 2006: I have to add a Build Phase script:
#!/bin/bash strip "$TARGET_BUILD_DIR/$EXECUTABLE_PATH"
The '#!/bin/bash' line is redundant (but harmless). A "she-bang" line is automatically pre-pended to your script using the contents of the Shell field of the script phase info. If you really require bash, make sure this is set to /bin/bash.
I haven't contributed at all to this list as I'm still a lurking newbie, but I just have to pipe up here. It's not remotely redundant. It's a great habit to get into and the fact *nix kernels have this default behaviour just makes bad habits. If someone gets the idea that it's redundant and starts writing scripts for "the world" to use and someone in that world has their shell as CSH or SH then they're going to find that the script doesn't work. And if they're a newbie, they're not going to know why.
So, please, for the sake of the rest of the world, please include the sharp-bang.
His point is that in Xcode it's redundant, as the text field just above the script is the shell to execute it with. When Xcode executes the script, it does exactly the same thing that #! does.
So the #! is worse than redundant: it's actually misleading. If you set the shell explicitly to another script interpreter (like /usr/bin/osascript), the #! may be ignored or actually erroneous.
If and when the scripts are stored as separate files and always executed with the default shell, the shebang will be important; for now, omit it.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden