Guest User

Untitled

a guest
Jun 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/bin/bash
  2. # Remote virtual interface for a single iPhone
  3.  
  4. udid=$(instruments -s devices | grep -v "Simulator" | grep "iPhone" | awk -F '[][]' '{print $2}')
  5.  
  6. if [ -z "$udid" ]; then
  7. echo "No UDID found" 1>&2
  8. exit 1
  9. else
  10. echo "Found UDID $udid"
  11. fi
  12.  
  13. rvi="rvi0"
  14. if [[ $(ifconfig -l) =~ $rvi ]]; then
  15. echo "The $rvi interface already exists" 1>&2
  16. exit 2
  17. else
  18. rvictl -s "$udid"
  19. rvi_success=$?
  20. ifconfig -l
  21. exit $rvi_success
  22. fi
  23.  
  24. exit 1
Add Comment
Please, Sign In to add comment