Created
July 24, 2013 05:32
-
-
Save Temikus/6068264 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#Retrieve the list of devices, an IPA file was built for by parsing the embedded.mobileprovision. | |
[[ -n "$1" ]] || { echo "Usage: ./check_devs.sh sample.ipa"; exit 0 ; } | |
LANG=C | |
IPAFILE=$1 | |
TMPDIR=tmp$$.tmp | |
mkdir $TMPDIR | |
unzip -qq $IPAFILE -d $TMPDIR | |
EMBEDFILE=`find $TMPDIR -name embedded.mobileprovision -print | head -1` | |
EMBEDFILEONLY=$EMBEDFILE.plist | |
sed -n '/plist/,/\/plist/p' $EMBEDFILE > $EMBEDFILEONLY | |
sed -n '/ProvisionedDevices/,/\/array/p' $EMBEDFILEONLY | grep string | sed 's/<[/]*string>//g' | |
rm -rf $TMPDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment