记录之前用Shell和Python分别写的自动打包脚本。
Shell
语法
变量
1 | # 字符串 |
条件语句
1 | if $isNeedPodInstall; then |
函数
1 | build() |
写文件
1 | echo "创建Plist文件" |
执行参数
1 | # ./build -c "修复已知问题" |
Python
语法
头文件
1 | import sys, os |
gflags
是Google的参数解析库。
1 | # 定义Python主入口 |
函数
1 | def execuse(commond): |
类
1 | class Build: |
Archive
shell版本
1 |
|
python版本
1 | #! /usr/bin/python |