Files
VIPMudCosmicRageScripts/repair tool.bat
2025-07-02 14:45:47 +03:00

35 lines
706 B
Batchfile

@echo off
setlocal
:: Define repo paths
set "SCRIPTS_DIR=%~dp0"
set "SOUNDS_DIR=%~dp0sounds"
:: Try to use system git, fallback to GitPortable
where git >nul 2>nul
if %errorlevel%==0 (
set "GIT=git"
) else if exist "%~dp0GitPortable\cmd\git.exe" (
set "GIT=%~dp0GitPortable\cmd\git.exe"
) else (
echo Git not found. Please install Git or place GitPortable in the same folder.
exit /b 1
)
:: Reset scripts repo
echo Resetting scripts repo to remote...
pushd "%SCRIPTS_DIR%"
%GIT% fetch origin
%GIT% reset --hard origin/main
popd
:: Reset sounds repo
echo Resetting sounds repo to remote...
pushd "%SOUNDS_DIR%"
%GIT% fetch origin
%GIT% reset --hard origin/main
popd
echo Done.
endlocal