Skip to content

Instantly share code, notes, and snippets.

@willyliu
Created March 22, 2017 04:32
Show Gist options
  • Save willyliu/6fe9da5579f60a7babec472b57de411a to your computer and use it in GitHub Desktop.
Save willyliu/6fe9da5579f60a7babec472b57de411a to your computer and use it in GitHub Desktop.
Lists provision profiles' names
#!/bin/bash
SAVEIFS=$IFS
IFS=$'\n'
path="$HOME/Library/MobileDevice/Provisioning Profiles/*.provisionprofile"
for filename in $path; do
profileName=`/usr/libexec/plistbuddy -c Print:Name /dev/stdin <<< \
\`security cms -D -i $filename\``
echo $profileName
done
IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment