servo/support/android/egl-configs/run.sh
Simon Sapin 484eee8624 Tidy
2018-07-02 13:25:44 +02:00

30 lines
579 B
Bash
Executable file

#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -o errexit
set -o nounset
set -o pipefail
# Any
target=""
# Specific device
#target="-s something"
# Emulator
#target="-e"
# USB
#target="-d"
path="${1}"
base="$(basename ${1})"
remote_path="/data/local/tmp/${base}"
shift
adb ${target} "wait-for-device"
adb ${target} push "${path}" "${remote_path}" >&2
adb ${target} shell "${remote_path}" "${@}"