mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
cargo run into Android/adb: configurable target device
This commit is contained in:
parent
1f8d04b8e1
commit
6e6870516e
1 changed files with 15 additions and 3 deletions
|
@ -1,10 +1,22 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Any
|
||||||
|
#target=""
|
||||||
|
|
||||||
|
# Specific device
|
||||||
|
#target="-s something"
|
||||||
|
|
||||||
|
# Emulator
|
||||||
|
target="-e"
|
||||||
|
|
||||||
|
# USB
|
||||||
|
#target="-d"
|
||||||
|
|
||||||
path="$1"
|
path="$1"
|
||||||
base="$(basename $1)"
|
base="$(basename $1)"
|
||||||
remote_path="/data/local/tmp/$base"
|
remote_path="/data/local/tmp/$base"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
adb -e wait-for-device
|
adb $target "wait-for-device"
|
||||||
adb -e push "$path" "$remote_path"
|
adb $target push "$path" "$remote_path" >&2
|
||||||
adb -e shell "$remote_path" "$@"
|
adb $target shell "$remote_path" "$@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue