mirror of
https://github.com/sweidac/kidsbox.git
synced 2026-10-28 06:52:57 +01:00
Fix install.sh and setup.sh for macOS compatibility
install.sh: - Add SCRIPT_DIR so .env is written to the repo root regardless of cwd - Detect OS (macOS/Linux) and show platform-appropriate missing-tool hints - Check for Xcode Command Line Tools on macOS (required by IDF install.sh) - Handle pip3 absence by falling back to python3 -m pip - Remove ninja from hard prerequisite list (IDF bundles its own) setup.sh: - Show macOS serial port hint (/dev/cu.usbserial-*) vs Linux (/dev/ttyUSB0) - Show macOS SD card mount hint (/Volumes/) vs Linux (/media/$USER/) https://claude.ai/code/session_01MhAnh68DPNnTjcKqjNYDmk
This commit is contained in:
2 files changed
+69
-14
No files matched your search
@@ -82,7 +82,12 @@ prompt "Flash firmware to device now? [y/N] "
|
||||
read -r DO_FLASH
|
||||
|
||||
if [[ "$DO_FLASH" =~ ^[Yy]$ ]]; then
|
||||
prompt "Serial port (e.g. /dev/ttyUSB0, leave blank to auto-detect): "
|
||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||
PORT_HINT="/dev/cu.usbserial-* or /dev/cu.SLAB_USBtoUART"
|
||||
else
|
||||
PORT_HINT="/dev/ttyUSB0 or /dev/ttyACM0"
|
||||
fi
|
||||
prompt "Serial port (e.g. $PORT_HINT, leave blank to auto-detect): "
|
||||
read -r SERIAL_PORT
|
||||
|
||||
if [[ -n "$SERIAL_PORT" ]]; then
|
||||
@@ -96,7 +101,12 @@ fi
|
||||
|
||||
heading "SD card setup"
|
||||
|
||||
prompt "Mount path of SD card (e.g. /media/\$USER/KIDSBOX, leave blank to skip): "
|
||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||
SD_HINT="/Volumes/KIDSBOX"
|
||||
else
|
||||
SD_HINT="/media/\$USER/KIDSBOX"
|
||||
fi
|
||||
prompt "Mount path of SD card (e.g. $SD_HINT, leave blank to skip): "
|
||||
read -r SD_MOUNT
|
||||
|
||||
if [[ -n "$SD_MOUNT" ]]; then
|
||||
|
||||
Reference in new issue
Block a user