Advertisement
Guest User

Untitled

a guest
Aug 4th, 2018
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.43 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. set giturl=https://git.xpenia.games/team-jb/jbep3_game.git
  4.  
  5. echo Jabroni Brawl: Episode 3 Install Script v4.1 (by Ott, RaraKnight and Stewsta)
  6. echo.
  7.  
  8. FOR %%* IN (.) DO set CurrDirName=%%~nx*
  9. IF NOT "!CurrDirName!" == "sourcemods" (
  10.     echo Please place this batch file in your sourcemods folder before running it.
  11.     goto fuck
  12. )
  13.  
  14. echo Checking for git
  15. where git | find "git.exe"
  16. if !ERRORLEVEL! == 0 goto installcheck
  17. echo Git was not detected/installed. Please make sure Git is installed before running this script.
  18. goto fuck
  19.  
  20. :installcheck
  21. IF EXIST jbep3\ (
  22.     echo.
  23.     echo Updating existing install.
  24.     echo.
  25.     echo Checking repository.
  26.     cd jbep3\
  27.     git remote -v | find "origin    %giturl%"
  28.     if !ERRORLEVEL! == 0 goto update
  29.     goto repochange
  30. ) ELSE (
  31.     echo Downloading new copy.
  32.     echo.
  33.     git clone -b master --depth 1 --progress "%giturl%" jbep3/
  34.     echo.
  35.     echo All done. Your game should now be up to date.
  36.     goto fuck
  37. )
  38.  
  39. :repochange
  40. echo.
  41. echo Updating to new repository.
  42. git checkout master
  43. git branch -d lua-gutting
  44. git remote set-url origin %giturl%
  45.  
  46. :update
  47. echo.
  48. echo Downloading game updates.
  49. git fetch --depth 1
  50. FOR /f %%i IN ('git rev-parse origin/master') DO set LatestRevision=%%i
  51. :: Most reliable way to update in case of mismatched history shit.
  52. git reset --hard !LatestRevision!
  53. cd ..
  54. echo.
  55. echo All done. Your game should now be up to date.
  56.    
  57. :fuck
  58. echo.
  59. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement