shell脚本删除指定mobileprovision
由于某种原因,xcode帮我按照了几千个开发和上线证书,需要删除这部分证书:
#dir="/Users/Ethan/Library/MobileDevice/Provisioning Profiles/" dir="/Users/Ethan/Desktop/test/" filelist=`ls "${dir}"` #echo $filelist for filename in $filelist do PROFILE_FILE="${dir}${filename}" #echo ${PROFILE_FILE} appidname=`egrep -a -A 2 AppIDName "${PROFILE_FILE}" | grep string | sed -e ‘s/<string>//‘ -e ‘s/<\/string>//‘ -e ‘s/ //‘` #echo $appidname IdentifierPrefix=`egrep -a -A 2 ApplicationIdentifierPrefix "${PROFILE_FILE}" | grep string | sed -e ‘s/<string>//‘ -e ‘s/<\/string>//‘ -e ‘s/ //‘` #echo $IdentifierPrefix first=${appidname:0:2} if [ ${IdentifierPrefix} == "H57E834M6D" ]&&[ ${first} == "m" ] then rm "${PROFILE_FILE}" fi done
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。