解析签名文件

2021-07-22  本文已影响0人  清宵寒夜

cd dirname $0

ipafloder=$(pwd)

ipaPath=''

if[[ ! $1]];then

ipaname=`find . -name '.ipa' -maxdepth 1`
ipaname=${ipaname#
/}
ipaPath=$ipafloder/$ipaname

echo查找当前目录下的ipa文件
else
ipaPath=$1
echoipa为传入参数$ipaPath
fi
echoipa路径$ipaPath
unzipPath=$(pwd)/ipaInfo
unzip $ipaPath -d ${unzipPath}
if[[ ! $? ==0]];then
echo "$1解压失败!"
rm -rf ${unzipPath}
exit0
fi
cd${unzipPath}/Payload/*.app

plistPath=$ipafloder/ipaInfo.plist

security cms -D -i embedded.mobileprovision > ${plistPath}

if[[ ! $? ==0]];then
echo "获取$1信息失败!"
rm -rf ${unzipPath}
rm ${plistPath}
exit0
fi
rm -rf ${unzipPath}
open $plistPath

上一篇 下一篇

猜你喜欢

热点阅读