Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- set giturl=https://git.xpenia.games/team-jb/jbep3_game.git
- echo Jabroni Brawl: Episode 3 Install Script v4.1 (by Ott, RaraKnight and Stewsta)
- echo.
- FOR %%* IN (.) DO set CurrDirName=%%~nx*
- IF NOT "!CurrDirName!" == "sourcemods" (
- echo Please place this batch file in your sourcemods folder before running it.
- goto fuck
- )
- echo Checking for git
- where git | find "git.exe"
- if !ERRORLEVEL! == 0 goto installcheck
- echo Git was not detected/installed. Please make sure Git is installed before running this script.
- goto fuck
- :installcheck
- IF EXIST jbep3\ (
- echo.
- echo Updating existing install.
- echo.
- echo Checking repository.
- cd jbep3\
- git remote -v | find "origin %giturl%"
- if !ERRORLEVEL! == 0 goto update
- goto repochange
- ) ELSE (
- echo Downloading new copy.
- echo.
- git clone -b master --depth 1 --progress "%giturl%" jbep3/
- echo.
- echo All done. Your game should now be up to date.
- goto fuck
- )
- :repochange
- echo.
- echo Updating to new repository.
- git checkout master
- git branch -d lua-gutting
- git remote set-url origin %giturl%
- :update
- echo.
- echo Downloading game updates.
- git fetch --depth 1
- FOR /f %%i IN ('git rev-parse origin/master') DO set LatestRevision=%%i
- :: Most reliable way to update in case of mismatched history shit.
- git reset --hard !LatestRevision!
- cd ..
- echo.
- echo All done. Your game should now be up to date.
- :fuck
- echo.
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement