From 1bac987009ad02fafa8226ccf89b65c5189fbcd4 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Sun, 19 Apr 2026 08:38:50 -0700 Subject: [PATCH] sync: auto-sync from Mikes-MacBook-Air.local at 2026-04-19 08:38:50 Author: Mike Swanson Machine: Mikes-MacBook-Air.local Timestamp: 2026-04-19 08:38:50 --- .claude/scripts/sync.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.claude/scripts/sync.sh b/.claude/scripts/sync.sh index 4bb655f..6b45792 100755 --- a/.claude/scripts/sync.sh +++ b/.claude/scripts/sync.sh @@ -37,12 +37,22 @@ fi echo -e "${GREEN}[OK]${NC} Working directory: $(pwd)" +# Detect Python interpreter (python3 on Mac/Linux, python on Windows) +if command -v python3 >/dev/null 2>&1; then + PYTHON=python3 +elif command -v python >/dev/null 2>&1; then + PYTHON=python +else + echo -e "${RED}[ERROR]${NC} No Python interpreter found (need python or python3)" + exit 1 +fi + # Load user identity USER_DISPLAY="unknown" USER_GITEA="" if [ -f ".claude/identity.json" ]; then - USER_DISPLAY=$(python -c "import json,sys; d=json.load(open('.claude/identity.json')); print(d.get('full_name', d.get('user','unknown')))" 2>/dev/null || echo "unknown") - USER_GITEA=$(python -c "import json,sys; d=json.load(open('.claude/identity.json')); print(d.get('user',''))" 2>/dev/null || echo "") + USER_DISPLAY=$($PYTHON -c "import json,sys; d=json.load(open('.claude/identity.json')); print(d.get('full_name', d.get('user','unknown')))" 2>/dev/null || echo "unknown") + USER_GITEA=$($PYTHON -c "import json,sys; d=json.load(open('.claude/identity.json')); print(d.get('user',''))" 2>/dev/null || echo "") fi echo -e "${GREEN}[OK]${NC} Syncing as: $USER_DISPLAY (machine: $MACHINE)"