将xcode-select添加到PATH与安装Xcode命令行工具?

ma1*_*w28 5 xcode path command-line-tool .bash-profile

现在使用Xcode 4.5,可以将以下行添加到我的行中,~/.bash_profile而不是安装Xcode命令行工具吗?

export PATH="$PATH:`xcode-select -print-path`/usr/bin:`xcode-select -print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin"
Run Code Online (Sandbox Code Playgroud)

注意:Xcode对命令行工具说以下几点:

在安装之前,请注意,您可以在Terminal中使用XCRUN工具启动Xcode应用程序中嵌入的编译器和其他工具。使用XCODE-SELECT工具定义哪个版本的Xcode是活动的。在终端中输入“ man xcrun”以了解更多信息。