added a repair tool to fix repos if broken
This commit is contained in:
34
repair tool.bat
Normal file
34
repair tool.bat
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
@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
|
||||||
Reference in New Issue
Block a user