How to Run a Custom Shell Script During an XCODE Build
2015-11-12 21:05
811 查看
Right click on the specific target in XCODE
You can enter your shell script like this, here is a sample script to list available variables.
Build and Run and come open build results to see your script results.
转自:http://stackoverflow.com/questions/5319989/xcode-4-build-setting-variables-for-scheme-scripts
Apart from that, if you select "None", there will be a bunch of environment variables set by Xcode. You can discover all of them by doing something like
Some of the more useful environment variables include
参考说明
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html shell的官方参考网页
https://developer.apple.com/library/ href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=18&is_app=0&jk=32e722cb7188cf3&k=mac&k0=mac&kdi0=0&luki=2&mcpm=0&n=10&p=baidu&q=55063160_cpr&rb=0&rs=1&seller_id=1&sid=f38c18b72c722e03&ssp2=1&stid=0&t=tpclicked3_hc&td=1722090&tu=u1722090&u=http%3A%2F%2Fit%2Ezhaozhao%2Einfo%2Farchives%2F46023&urlid=0" target=_blank>mac/#documentation/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004268-TP40003516
You can enter your shell script like this, here is a sample script to list available variables.
Build and Run and come open build results to see your script results.
Xcode
4 build setting variables for scheme scripts
转自:http://stackoverflow.com/questions/5319989/xcode-4-build-setting-variables-for-scheme-scriptsApart from that, if you select "None", there will be a bunch of environment variables set by Xcode. You can discover all of them by doing something like
printenv > ~/Desktop/printenv.txtto have them dumped to a text file.
Some of the more useful environment variables include
ARCHIVE_PATH,
SCHEME_NAME,
USER,
ARCHIVE_DSYMS_PATH,
ARCHIVE_PRODUCTS_PATH.
参考说明
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html shell的官方参考网页
https://developer.apple.com/library/ href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=18&is_app=0&jk=32e722cb7188cf3&k=mac&k0=mac&kdi0=0&luki=2&mcpm=0&n=10&p=baidu&q=55063160_cpr&rb=0&rs=1&seller_id=1&sid=f38c18b72c722e03&ssp2=1&stid=0&t=tpclicked3_hc&td=1722090&tu=u1722090&u=http%3A%2F%2Fit%2Ezhaozhao%2Einfo%2Farchives%2F46023&urlid=0" target=_blank>mac/#documentation/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004268-TP40003516
相关文章推荐
- linux下设计一个Shell脚本:判断当前工作目录下所有的文件类型。
- linux下设计一个Shell脚本:求命令行上所有整数和
- PowerShell 之 CA Server
- Linux C编程与Shell编程在开发实用工具方面的相同点总结
- Linux Bash Shell快速入门 在线教程
- Bash Shell 快捷键
- shell脚本:一键安装LAMP、LNMP脚本
- ADB shell出现error:device offline提示
- Shell实现每日自动导出AWR报表
- PowerShell 之 DHCP server
- shell中不可不知的叹号
- 常用shell例子
- DELL服务器硬件信息采集SHELL脚本
- 在Windows7环境下使用GIT BASH免输入密码
- Bash 什么时候会给 HOME 赋初始值
- shell编程之【分发系统】
- bash的三种引号
- Linux usleep for shell
- PowerShell 之 DNS Server (2)
- [Shell] 读取脚本路径