-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall.cmd
More file actions
68 lines (51 loc) · 1.58 KB
/
Copy pathinstall.cmd
File metadata and controls
68 lines (51 loc) · 1.58 KB
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
@echo off
if exist extra goto skipclone
if NOT EXIST ../steam.inf GOTO NOTOK3
if exist menu2 goto skipclone_goto
git clone --recursive --branch luaserverlist https://github.com/Python1320/gmod_menu2 menu2
goto cloned
:skipclone_goto
cd menu2
call install.cmd
exit 0
:skipclone
git checkout gzip.exe wget.exe README.md
git pull
git submodule update --recursive
goto skipclone2
:cloned
if NOT EXIST menu2 GOTO NOTOK0
cd menu2
:skipclone2
if NOT EXIST extra\vstruct\lua\vstruct\vstruct GOTO NOTOK1
if NOT EXIST ../../steam.inf GOTO NOTOK2
if NOT EXIST ../includes GOTO NOTOK2
echo Copying files...
ROBOCOPY extra/garrysmod ../../ *.* /s /NFL /NDL /NJH /NJS
ROBOCOPY extra\serverquery\lua ../ *.* /s /NFL /NDL /NJH /NJS
ROBOCOPY extra\vstruct\lua ../ *.* /s /NFL /NDL /NJH /NJS
echo GeoIP file check..
if exist ..\..\..\GeoIP.dat goto skipgeoip
echo Downloading GeoIP...
wget "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
echo Extracting GeoIP.dat.gz and copying to where hl2.exe is
gzip -d GeoLiteCity.dat.gz
copy GeoLiteCity.dat ..\..\..\GeoIP.dat
:skipgeoip
echo === ALL DONE, maybe ===
goto EOF
:NOTOK0
@ echo Missing menu2 (could not clone?)
goto EOF
:NOTOK1
@ echo Missing menu2\extra\vstruct\lua\vstruct\vstruct (did you git clone with submodules, recursively)
goto EOF
:NOTOK2
@ echo Installed in wrong folder (Put me to garrysmod/lua/install.cmd)
goto EOF
:NOTOK3
@ echo Installed in wrong folder (Put me to garrysmod/lua/install.cmd)
goto EOF
:EOF
pause
del /Q gzip.exe wget.exe README.md GeoLiteCity.dat