Files
unlimitedcoding/codex/ucodex_update.sh
delta-cloud-208e 128ec80ed0 fix(codex): macOS compatibility for install/update/uninstall scripts
- Replace grep -oP (Perl regex) with portable sed — fixes "grep: invalid option -- P" on macOS
- Add sedi() wrapper for cross-platform sed -i (BSD vs GNU)
- Detect macOS via uname and use apple-darwin binary suffix instead of linux-musl
- Add is_native_binary() helper: checks both ELF (Linux) and Mach-O (macOS)
- macOS env vars: use launchctl setenv + /etc/codex-env.sh + ~/.zshrc source line
- Linux env vars: keep /etc/environment + /etc/profile.d/ as before
- Wrapper script uses dynamic ENV_FILE path instead of hardcoded /etc/profile.d/
- Fix SUDO_USER handling for correct ~/.zshrc path when run via sudo
- Uninstaller: also remove .codex-bin, /etc/codex-env.sh, launchctl vars, rc file entries
- Uninstaller: scan /Users/* on macOS instead of /home/*
- Fix CRLF line endings in ucodex_uninstall.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:45:41 +00:00

5.5 KiB