Fix setup on stock macOS bash, shader step false success, battery gate misreport (#4, #5, #7)

- Brace every $NAME that is directly followed by a non-ASCII character in the shell scripts: bash 3.2 in a UTF-8 locale read the first byte of the following character as part of the variable name and aborted under set -u (#4, #6).
- setup.sh and d2rm_pack.py: the shader translation step is complete only when every entry in the completion marker is ok and every library file exists; the script's exit status is no longer hidden by a pipe (#5).
- devbattery.sh / devlock.sh: a missing local timeout or ideviceinfo is reported as such and stops at once, instead of being reported as an offline device and polled for up to an hour (#7).
- smoke_mac.sh builds its package for iPhone only regardless of the project default.

Reported by @SakuraToErii. The setup.sh part of #4 was also submitted by @hubeiqiao in #6.

Co-authored-by: hubeiqiao <12777592+hubeiqiao@users.noreply.github.com>
This commit is contained in:
jhaizhou
2026-10-13 03:17:23 +08:00
co-authored by hubeiqiao
parent 824d2d3f0b
commit 66c3a2fb70
28 changed files with 121 additions and 68 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ SC=${SC:-$HERE/verify/savecmp.py}
MJ=$TR/meta.json; [ -f "$TR/meta.v2.json" ] && MJ=$TR/meta.v2.json # 补记墙钟区间的版本 | The version with the wall-clock interval recorded afterwards
MJ=${META:-$MJ} # 可显式指定 | Can be specified explicitly
AT="--a-meta=$MJ"; grep -q wall_start "$MJ" || AT=${A_TIME:+--a-time=$A_TIME}
echo "③ 正对照:真值 vs 宿主($SC --b-time=$FT $AT)"; $PY "$SC" "$TR/save_after" "$T/user" --b-time=$FT $AT; G=$?
echo "③ 正对照:真值 vs 宿主($SC --b-time=$FT ${AT})"; $PY "$SC" "$TR/save_after" "$T/user" --b-time=$FT $AT; G=$?
echo "③ 负对照:真值 vs 起始存档"; $PY "$SC" "$TR/save_after" "$REF/0000000000000001" --b-time=$FT $AT; N=$?
echo "结论:逐拍退出码 ${K6}、正对照退出码 ${G}(0 = 绿),负对照退出码 ${N}(须非 0)"
[ $K6 = 0 ] && [ $G = 0 ] && [ $N != 0 ]