由于某种原因,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
时间: 2024-10-10 04:40:48