3 roots
="/tmp/security.roots.tgz" 
   4 syms
="/tmp/security.syms.tgz" 
   5 srcs
="/tmp/security.src.tgz" 
   6 sshopts
=(-o CheckHostIP
=no 
-o StrictHostKeyChecking
=no 
-o NoHostAuthenticationForLocalhost
=yes -o UserKnownHostsFile
=/dev
/null
) 
   8 locations
=(`mobdev list | awk '/UDID/ { gsub(/^(.*location ID = )+|(,.*)+$/, ""); print}'`) 
  12 symdir
="/var/mobile/secsyms" 
  14 for location 
in $locations 
  16         echo 'Installing to location '"$location" 
  18         tcprelay 
--portoffset $port_offset --locationid $location ssh >/dev
/null 
2>&1 & 
  20         (( sshport 
= $port_offset + 22 )) 
  22         echo "Copying roots to device (via port $sshport)" 
  23         scp 
-P $sshport $sshopts $roots $syms $srcs root@localhost
:/var
/mobile
/ 
  25         echo "SSH to device and do commands" 
  26         ssh  $sshopts -p $sshport root@localhost 
<< END 
  29 /usr/local/bin/darwinup install "/var/mobile/`basename $roots`" | grep -v '^  /' 
  30 /usr/local/bin/darwinup uninstall superseded > /dev/null 2>&1 || true 
  31 touch /System/Library/Caches/com.apple.xpcd/xpcd_cache.dylib 
  32 /usr/local/bin/mobile_install rebuild internal 
  33 /bin/launchctl stop com.apple.securityd 
  34 /bin/launchctl stop com.apple.security.cloudkeychainproxy3 
  35 /bin/launchctl stop com.apple.security.CircleJoinRequest