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.

New contributor
Darko is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
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

Darko is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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