#!/bin/bash
##
## Script to simplify the OTA installation of Cydia Extender
## "su", then "bash [Filename]"
##
read_dom () {
local IFS=\>
read -d \< ENTITY CONTENT
}
MOBILE_PROVISION=$( find /var/containers/Bundle/Application | grep yalu | grep mobilepro )
FOUND_KEY=0
while read_dom; do
if [[ $ENTITY = "key" ]] && [[ $CONTENT = "TeamIdentifier" ]]; then
FOUND_KEY=1
fi
if [[ $FOUND_KEY = "1" ]] && [[ $ENTITY = "string" ]]; then
cyextender $CONTENT
exit
fi
done < $MOBILE_PROVISION