Skip to content

Instantly share code, notes, and snippets.

@dfreniche
Created September 11, 2014 10:29
Show Gist options
  • Save dfreniche/c4c655e842448d6b0af2 to your computer and use it in GitHub Desktop.
Save dfreniche/c4c655e842448d6b0af2 to your computer and use it in GitHub Desktop.
bash alias to print human-readable names from iOS provisioning profiles
# print human-readable names from iOS provisioning profiles
get_provisioning_profile_name() {
strings $1 | grep -A 1 "<key>Name</key>" | sed 's/<key>//' | sed 's/<string>//'
}
alias namepp=get_provisioning_profile_name
get_all_provisioning_profile_names() {
for f in `ls -1 *.mobileprovision`
do
echo -e "💻 Processing\033[0;32m $f \033[0m";
RESULT=`strings $f | grep -A 1 --line-buffered "<key>Name</key>" | sed 's/<[^>]*>//g'`
echo -e "\033[0;34m $RESULT \033[0m --> \033[0;32m $f \033[0m";
done
}
alias nameallpp=get_all_provisioning_profile_names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment