Merge independent repo of config files
[distro-setup] / rew
1 #!/bin/bash
2
3 set -eE -o pipefail
4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
5
6 p="$(lsof -i tcp:31416 -Fp -a -c java | sed -rn 's/^p//p')" ||:
7 if [[ $p ]]; then
8 kill $p
9 fi
10
11 # so we don't hold open the /a fs
12 sudo rsync -r --delete /a/opt/gnirehtet /opt
13 cd /opt/gnirehtet
14
15 # just running it in foreground so it's easier to kill etc.
16 ./gnirehtet rt
17
18
19 # note, to kill it, you need to also kill
20 # lsof -i tcp:31416
21 # and maybe unplug adb cable
22 # note, ping results in log message: dropping invalid packet
23
24
25 #./gnirehtet rt &>/tmp/rt &
26
27 #tail -F /tmp/rt ||: