Compare commits

...

2 Commits

Author SHA1 Message Date
Codex
c282674057 Show help for app-server script default 2026-05-25 05:23:30 +00:00
Codex
3b222b4b89 Fix Codex upgrade script edge cases 2026-05-25 05:16:12 +00:00

View File

@@ -42,7 +42,9 @@ USAGE
}
pid_from_file() {
tr -cd '0-9' < "$PID_FILE" 2>/dev/null || true
if [[ -f "$PID_FILE" ]]; then
tr -cd '0-9' < "$PID_FILE" 2>/dev/null || true
fi
}
server_pid() {
@@ -349,7 +351,10 @@ extract_codex_binary() {
tar -xzf "$archive" -C "$dest/extract"
found="$(find "$dest/extract" -type f -name codex -print | head -n 1)"
if [[ -z "$found" ]]; then
echo "downloaded archive does not contain a codex binary" >&2
found="$(find "$dest/extract" -type f -name 'codex-*' -perm -u+x -print | head -n 1)"
fi
if [[ -z "$found" ]]; then
echo "downloaded archive does not contain a Codex executable" >&2
return 1
fi
chmod +x "$found"
@@ -549,7 +554,7 @@ apply_upgrade_worker() {
return "$rc"
}
cmd="${1:-start}"
cmd="${1:-help}"
case "$cmd" in
start)
shift || true