Files
unlimitedcoding/claude/uclaude_update.bat
delta-cloud-208e 6479aacfd4 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
2026-02-21 11:58:33 +00:00

57 lines
1.3 KiB
Batchfile

@echo off
REM UClaude Updater — automatic Claude Code patch updater
REM Usage: claude\uclaude_update.bat [--check] [--force] [--settings-only]
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%\.."
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 ----
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.
pause
)