android: the same SIGPIPE race, in the two focus checks it has not lost yet
deploy.sh and dev.sh both ask which app is on screen with `echo "$FOCUS" | grep -qi`, under the same `set -o pipefail`. $FOCUS is one line, so echo has always finished writing before grep -q exits and the race has never been lost — but it is the identical shape that made verify-icon.sh report a missing file in an APK that contained it. Herestrings, so there is no writer to kill.
This commit is contained in:
1 parent
c36ec439ce
commit
a44b4422fd
2 files changed
+9
-2
No files matched your search
@@ -55,7 +55,8 @@ echo "== install $(date +%T)"
|
||||
"$ADB" reverse tcp:1421 tcp:1421
|
||||
"$ADB" shell am force-stop com.soulstream.app
|
||||
FOCUS=$("$ADB" shell dumpsys window 2>/dev/null | grep -a "mCurrentFocus" | head -1)
|
||||
if echo "$FOCUS" | grep -qi "soulstream\|launcher"; then
|
||||
# herestring, for the reason spelled out in deploy.sh beside the same test
|
||||
if grep -qi "soulstream\|launcher" <<< "$FOCUS"; then
|
||||
"$ADB" shell am start -n com.soulstream.app/.MainActivity >/dev/null
|
||||
echo "== launched $(date +%T) — serve the frontend on 1421 (npm run dev) if it is not up"
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user