Reputation: 105
This is something really simple, but I can't seem to find the answer anywhere, and I'm new to both Mac and UNIX, which doesn't help.
I've installed Xcode on my mac, along with the iPhone SDK 3.2. I'm trying to run Xcode command utilities that came with the SDK from the unix terminal, but I don't know how to update the paths so that the system knows where to find them. Here is what I do.
Is there some sort of PATHS environment variable that I need to permanently update? Or perhaps Xcode comes with its own Terminal application with those new paths already baked in? Finally, what's the difference between sh and bash?
Thanks for the help!
Upvotes: 4
Views: 8589
Reputation: 410542
I'm using Snow Leopard + Xcode, and xcodebuild
and xcrun
are both present at /usr/bin
. Regardless, they should be present at /Developer/usr/bin
-- you just have to make sure that path is in your $PATH
variable. You can set it in your shell configuration file (~/.bashrc
for bash
) like so:
export PATH="/Developer/usr/bin:${PATH}"
As for the difference between sh
and bash
, bash
supports some extensions and other features not found in the more primitive sh
; however, on Mac OS X, sh
and bash
are the same program (this is typical on many Unix and Linux systems nowadays). However, when bash
is invoked as sh
(that is, you call /bin/sh
from the command line, rather than /bin/bash
), bash
will try to act like the more "traditional" sh
program.
Upvotes: 4