In OS X versions 10.7.4 and later, extended attributes are added to executable files (including shell scripts) and processed by the security settings that you define for your account. For example, checking xattr on one of your build scripts might look something like this:
$ ls -l@ make_more_helpers.sh -rwxr-xr-x@ 1 Hellman staff 3564 Sep 2 07:02 make_more_helpers.sh com.apple.quarantine 23
When Xcode tries to execute the script (again, depending on your security settings), it will consider the extended attributes and determine whether to allow this execution. If it finds that the creator of the script has not been approved, you will receive an error message, for example:
make_more_helpers.sh: /bin/bash: bad interpreter: Operation not permitted
Fortunately, this is an easy solution, and there are several ways to fix it. One such way would be to bundle scripts that are part of the projects you create with Xcode. You can also open the script in an editor that is allowed to run scripts and save it again, or just recursively scan the assembly directory for files with quarantine attributes and delete the attribute:
xattr -rd com.apple.quarantine /path/to/build
After that, you should notice that deleting another ls -l@ on script @ after permissions and com.apple.quarantine should be deleted. Now that you are trying to create your project, the script should be allowed to execute and succeed.
โณ https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/BeforeYouBegin/BeforeYouBegin.html
l'l'l source share