0

I have a very simple script I use to open Terminal from Xcode in project root folder:

#!/bin/bash
open -a Terminal "`pwd`"

I want to extend it to run pod install command so I've added && to run it.

#!/bin/bash
open -a Terminal "`pwd`" && pod install

It won't run the second command. I've tried with single &, putting pod install into another script and calling but didn't manage do execute. How would I do this ? I'm thinking since Xcode runs the script to open the terminal, the terminal has no idea about the pod install, so maybe if there is a way to pass input parameter to terminal that would need to be ran.

0

( Ive not tried this, just gleened it from the man page)

I expect the problem is the launcher is running the terminal command, and then running the pod command, rather then running the pod command afterwards. I think what you want to do is run the pod command IN the terminal.

Try

#!/bin/bash
open -a Terminal "`pwd`" -e "pod install"

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.