-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgen.bat
44 lines (35 loc) · 865 Bytes
/
gen.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
@echo off
setlocal EnableDelayedExpansion
REM Set the current directory to the location of this script
pushd %~dp0
REM Read in env.txt
for /F "tokens=*" %%A in ('type "env.txt"') do (
REM To execute the string, it must be set as a variable
set "var=set %%A"
!var!
)
REM Asisgn fallbacks in case the values are invalid
if [!lua!]==[] (
set "lua=lua"
)
if [!git!]==[] (
set "git=git"
)
if [!vim!]==[] (
set "vim=vim"
)
REM Remove the old love-api and clone in the new one
rd /q /s love-api
!git! clone https://github.com/love2d-community/love-api
REM Copy love-api to the specified directories
xcopy /e /q /y love-api syntax\love-api\
xcopy /e /q /y love-api doc\love-api\
REM Run the generation scripts
call doc\gen.bat
call syntax\gen.bat
REM Update the plugin
rd /q /s ..\plugin
xcopy /y plugin ..\plugin\
REM REmove love-api
rd /q /s love-api
popd