OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # ios_setup.sh: Sets environment variables used by other iOS scripts. | 9 # ios_setup.sh: Sets environment variables used by other iOS scripts. |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 RET="$(cat $TARGET)" | 75 RET="$(cat $TARGET)" |
76 ios_umount | 76 ios_umount |
77 echo -e "$RET" | 77 echo -e "$RET" |
78 } | 78 } |
79 | 79 |
80 # ios_mount: mounts the iOS device for reading or writing. | 80 # ios_mount: mounts the iOS device for reading or writing. |
81 ios_mount() { | 81 ios_mount() { |
82 # If this is already mounted we unmount it. | 82 # If this is already mounted we unmount it. |
83 if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then | 83 if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then |
84 >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting." | 84 >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting." |
85 ios_umount | 85 ios_umount || true |
86 fi | 86 fi |
87 | 87 |
88 # Ensure there is a mount directory. | 88 # Ensure there is a mount directory. |
89 if [[ ! -d "$IOS_MOUNT_POINT" ]]; then | 89 if [[ ! -d "$IOS_MOUNT_POINT" ]]; then |
90 mkdir -p $IOS_MOUNT_POINT | 90 mkdir -p $IOS_MOUNT_POINT |
91 fi | 91 fi |
92 ifuse --container $TEST_RUNNER_BUNDLE_ID $IOS_MOUNT_POINT | 92 ifuse --container $TEST_RUNNER_BUNDLE_ID $IOS_MOUNT_POINT |
93 sleep 1 | 93 sleep 1 |
94 >&2 echo "Successfully mounted device." | 94 >&2 echo "Successfully mounted device." |
95 } | 95 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 # adb_push_if_needed $HOST_SRC $ANDROID_DST | 178 # adb_push_if_needed $HOST_SRC $ANDROID_DST |
179 # else | 179 # else |
180 # echo -n "$ANDROID_DST " | 180 # echo -n "$ANDROID_DST " |
181 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 181 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
182 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 182 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
183 # fi | 183 # fi |
184 # fi | 184 # fi |
185 # } | 185 # } |
186 | 186 |
187 # setup_device "${DEVICE_ID}" | 187 # setup_device "${DEVICE_ID}" |
OLD | NEW |