mirror of
https://github.com/google/adb-sync.git
synced 2026-01-03 01:48:02 +00:00
adb-channel: also delete temps on SIGHUP.
This commit is contained in:
@@ -6,7 +6,7 @@ t=`mktemp -d -t adb-channel.XXXXXX`
|
|||||||
|
|
||||||
remote=${1}
|
remote=${1}
|
||||||
activity=${2}
|
activity=${2}
|
||||||
delat=${3}
|
delay=${3}
|
||||||
|
|
||||||
atexit() {
|
atexit() {
|
||||||
[ -z "${activity}" ] || adb shell am force-stop ${activity%%/*}
|
[ -z "${activity}" ] || adb shell am force-stop ${activity%%/*}
|
||||||
@@ -14,8 +14,9 @@ atexit() {
|
|||||||
rm -rf "${t}"
|
rm -rf "${t}"
|
||||||
}
|
}
|
||||||
trap atexit EXIT
|
trap atexit EXIT
|
||||||
|
trap 'exit 0' HUP
|
||||||
|
|
||||||
[ -z "${activity}" ] || adb shell am start -W ${activity}
|
[ -z "${activity}" ] || adb shell am start -W ${activity}
|
||||||
[ -z "${delay}" ] || sleep "${delay}"
|
[ -z "${delay}" ] || sleep "${delay}"
|
||||||
adb forward localfilesystem:"${t}/sock" "${1}"
|
adb forward localfilesystem:"${t}/sock" "${remote}"
|
||||||
socat stdio unix:"${t}/sock"
|
socat stdio unix:"${t}/sock"
|
||||||
|
|||||||
Reference in New Issue
Block a user