-
Notifications
You must be signed in to change notification settings - Fork 15
/
update_wrapper_quick.bat
59 lines (58 loc) · 1.37 KB
/
update_wrapper_quick.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
:: W:O4S Quick Updater Updater
:: Author: jaime.#8359 (jaigitrep159)
title Wrapper: Offline For Schools Git Quick Updater
popd
cls
echo Checking for Git installation...
echo:
if not exist "%PROGRAMFILES%\Git" (
if not exist "%PROGRAMFILES(X86)%\Git" (
echo Could not detect Git in Program Files folders.
echo:
echo Checking via command-line testing...
for /f "delims=" %%i in ('git^>nul') do set output=%%i
echo:
IF "%output%" EQU "" (
echo Okay, there's no sign of Git ANYWHERE on this computer.
PING -n 4 127.0.0.1>nul
echo That means YOU MUST HAVE INSTALLED THIS INCORRECTLY^!
PING -n 4 127.0.0.1>nul
set GITPULL=""
) else (
echo The command-line worked, therefore Git is installed.
echo:
)
)
) else (
echo Git was detected in one of the Program Files folders, therefore it is installed.
echo:
)
echo Saving custom settings in temporary file...
pushd utilities
copy config.bat tmpcfg.bat>nul
popd
echo:
echo Pulling latest version of repository from GitHub through Git...
PING -n 4 127.0.0.1>nul
echo:
call git pull
echo:
echo Deleting config.bat from repository and replacing it with user's copy...
pushd utilities
del config.bat
ren tmpcfg.bat config.bat
popd
echo:
echo ye
echo:
pause
)
)
if "%GITPULL%"=="" (
echo NO UPDATE FOR YOU^!
PING -n 5 127.0.0.1>nul
echo COME BACK, ONE YEAR^!
PING -n 4 127.0.0.1>nul
echo:
pause
)