mac 查找当前目录下所有同一类型文件,并执行命令行

以TexturePacker举例

MAC下用TexturePacker命令行打包当前目录下所有的 *.tps文件

1.配置好tps文件需要配置好路径、参数等。(也可不配置,用命令行实现。具体参考:https://www.codeandweb.com/texturepacker/documentation)

2.新建一个*.sh文件,内容填写

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "$DIR"
find $DIR -name *.tps -exec texturepacker --content-protection xxxxxx --scale 0.80 {} \;

xxxxxx为加密所用的密码,--scale为 缩放大小

 

posted @ 2015-12-07 10:48  liudb5  阅读(1466)  评论(0编辑  收藏  举报