由于某种原因,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 AppIDName "${PROFILE_FILE}" | grep string | sed -e 's/<string>//' -e 's/<\/string>//' -e 's/ //'`
#echo $appidname
IdentifierPrefix=`egrep -a -A ApplicationIdentifierPrefix "${PROFILE_FILE}" | grep string | sed -e 's/<string>//' -e 's/<\/string>//' -e 's/ //'`
#echo $IdentifierPrefix first=${appidname::} if [ ${IdentifierPrefix} == "H57E834M6D" ]&&[ ${first} == "m" ]
then
rm "${PROFILE_FILE}"
fi done