由于用 xctool 自动打包,而同事有些没有装 xctool, 只好自动优化了
即安装xctool 的使用 xctool ,方便调试, 没有装的 直接xcodebuild
命令如下
if which xctool 2>/dev/null; then
echo "xctool exists!"
else
echo "nope, no xctool installed."
fi
2>/dev/null 是将错误重定向到指定文件
相关详情见:
http://askubuntu.com/questions/350208/what-does-2-dev-null-mean