feat: full auto-install chain for all platforms
- Wire ensure_claude_code() into cmd_update() — auto npm install if missing - uclaude_install.sh: auto-install git, python3, curl via apt/dnf/yum/brew - uclaude_update.bat: prereq checks with winget install suggestions - uclaude_update.ps1: auto-install via winget (git, python, node) - install_node(): macOS support via brew, RHEL/Fedora via rpm.nodesource - Increased npm install timeout to 300s for slow connections
This commit is contained in:
@@ -6,11 +6,49 @@ setlocal enabledelayedexpansion
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
cd /d "%SCRIPT_DIR%\.."
|
||||
|
||||
REM Pull latest artifacts
|
||||
REM ---- Check prerequisites ----
|
||||
|
||||
where git >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ERROR: git not found.
|
||||
echo Install: winget install Git.Git
|
||||
echo or: https://git-scm.com/download/win
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
where python >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
where python3 >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Python not found.
|
||||
echo Install: winget install Python.Python.3.12
|
||||
echo or: https://www.python.org/downloads/
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
where node >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo WARNING: Node.js not found. Updater will attempt to guide you.
|
||||
echo Install: winget install OpenJS.NodeJS
|
||||
echo or: https://nodejs.org/
|
||||
)
|
||||
|
||||
REM ---- Pull latest artifacts ----
|
||||
git pull --quiet 2>nul
|
||||
|
||||
REM Run updater
|
||||
python claude\uclaude_updater.py %*
|
||||
REM ---- Run updater ----
|
||||
|
||||
REM Try python3 first, fallback to python
|
||||
where python3 >nul 2>&1
|
||||
if not errorlevel 1 (
|
||||
python3 claude\uclaude_updater.py %*
|
||||
) else (
|
||||
python claude\uclaude_updater.py %*
|
||||
)
|
||||
|
||||
if errorlevel 1 (
|
||||
echo.
|
||||
echo If you see permission errors, run this script as Administrator.
|
||||
|
||||
Reference in New Issue
Block a user