-
Notifications
You must be signed in to change notification settings - Fork 9
/
update_redrawn.bat
70 lines (59 loc) · 1.89 KB
/
update_redrawn.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
:: Redrawn Updater
:: Author: joseph the animator#2292
:: Original Author: tetradual#1525
:: License: MIT
title Redrawn Updater [Initializing...]
::::::::::::::::::::
:: Initialization ::
::::::::::::::::::::
:: Stop commands from spamming stuff, cleans up the screen
@echo off && cls
:: Lets variables work or something idk im not a nerd
SETLOCAL ENABLEDELAYEDEXPANSION
:: Make sure we're starting in the correct folder, and that it worked (otherwise things would go horribly wrong)
pushd "%~dp0"
if !errorlevel! NEQ 0 goto error_location
if not exist utilities ( goto error_location )
if not exist wrapper ( goto error_location )
if not exist server ( goto error_location )
goto noerror_location
:error_location
echo Doesn't seem like this script is in a Redrawn folder.
pause && exit
:noerror_location
:::::::::::::::::::::::::
:: Post-Initialization ::
:::::::::::::::::::::::::
title Redrawn Updater
if not exist .git ( goto nogit )
:yesgit
echo Redrawn Updater
echo A project from VisualPlugin adapted by IndyTheNerd and the Redrawn Team
echo:
echo Enter 1 to update Redrawn
echo Enter 0 to close the updater
goto wrapperidle
:nogit
echo You have not downloaded Redrawn using the installer... somehow??
echo Please download the installer and run it https://redrawnwrapper.github.io/Redrawn-Installer/install_redrawn.bat.
echo if your computer has 32bit UEFI, please run the installer here. https://redrawnwrapper.github.io/Redrawn-Installer/install_redrawn-x86.bat
pause & exit
:wrapperidle
echo:
:::::::::::::
:: Choices ::
:::::::::::::
set /p CHOICE=Choice:
if "!choice!"=="0" goto exitupdater
if "!choice!"=="1" goto update
echo Time to choose. && goto wrapperidle
:update
cls
pushd "%~dp0"
echo Pulling repository from GitHub...
git pull || git config --global --add safe.directory %USERPROFILE%\Redrawn && git add . && git stash && git pull
cls
echo Redrawn has been updated^^!
pause & exit
:exitupdater
pause & exit