| Index: platform_tools/ios/bin/ios_setup.sh
|
| diff --git a/platform_tools/ios/bin/ios_setup.sh b/platform_tools/ios/bin/ios_setup.sh
|
| index 5df7ac00d2cee064b8cbfe1cf711258bee512754..efffc1fd910ad618718c871517e176e5bcd2ffc3 100755
|
| --- a/platform_tools/ios/bin/ios_setup.sh
|
| +++ b/platform_tools/ios/bin/ios_setup.sh
|
| @@ -37,11 +37,6 @@ IOS_BUNDLE_ID="com.google.iOSShell"
|
|
|
| IOS_RESULTS_DIR="results"
|
|
|
| -if [[ $# -ge 1 ]]; then
|
| - BUILDTYPE=$1
|
| -fi
|
| -
|
| -set -x
|
|
|
| ios_uninstall_app() {
|
| ideviceinstaller -U "$IOS_BUNDLE_ID"
|
| @@ -58,7 +53,7 @@ ios_install_app() {
|
| cd $RET_DIR
|
| }
|
|
|
| -ios_rmdir() {
|
| +ios_rm() {
|
| local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
|
|
|
| ios_mount
|
| @@ -73,11 +68,19 @@ ios_mkdir() {
|
| ios_umount
|
| }
|
|
|
| +ios_cat() {
|
| + local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
|
| + ios_mount
|
| + RET="$(cat $TARGET)"
|
| + ios_umount
|
| + echo -e "$RET"
|
| +}
|
| +
|
| # ios_mount: mounts the iOS device for reading or writing.
|
| ios_mount() {
|
| # If this is already mounted we return.
|
| if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then
|
| - echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting."
|
| + >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting."
|
| ios_umount
|
| fi
|
|
|
| @@ -87,7 +90,7 @@ ios_mount() {
|
| fi
|
| ifuse --container $TEST_RUNNER_BUNDLE_ID $IOS_MOUNT_POINT
|
| sleep 1
|
| - echo "Successfully mounted device."
|
| + >&2 echo "Successfully mounted device."
|
| }
|
|
|
| # ios_umount: unmounts the ios device.
|
| @@ -105,11 +108,15 @@ ios_restart() {
|
| # The path is relative to the 'Documents' folder on the device.
|
| ios_pull() {
|
| # read input params
|
| - local IOS_SRC="$1"
|
| + local IOS_SRC="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
|
| local HOST_DST="$2"
|
|
|
| ios_mount
|
| - cp -r $IOS_MOUNT_POINT/$IOS_DOCS_DIR/$IOS_SRC $HOST_DST
|
| + if [[ -d "${HOST_DST}" ]]; then
|
| + cp -r "$IOS_SRC/" "$HOST_DST"
|
| + else
|
| + cp -r "$IOS_SRC" "$HOST_DST"
|
| + fi
|
| ios_umount
|
| }
|
|
|
|
|