Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a Shell Script target in Xcode 4.2?

I was wondering if anyone knew with XCode 4.1 how to create a shell script. The option for that doesn't exist, but it might be called something else in the latest version. Ta

like image 593
Doz Avatar asked Feb 01 '12 00:02

Doz


People also ask

How do I create a shell script in Xcode?

To create a custom build script: Open your project or workspace in Xcode and navigate to the Project navigator. Control-click the ci_scripts group you created earlier and choose New File. Choose the Shell Script template.

How do I run a script in Xcode?

Go to the Build Phases section of your project. (Click on the project, then on the main target, then on the “Build Phases” tab along the top.) Click the + at the top left to create a new build phase; choose “New Run Script Phase.” Xcode creates the script at the end of the list, naming it “Run Script.”

What shell does Xcode use?

so OS X 10.2 onwards, it has bash as default shell so whenever you install something and set PATH variables it sets in bash shell.


1 Answers

  1. Select your project in the navigator
  2. Click "Add Target" - Choose "Aggregate" for an empty Target
  3. Add Build Phase -> Add Run Script
  4. Click Build Phases and edit the Run Script Phase
like image 87
justin Avatar answered Oct 21 '22 18:10

justin