forked from stevedonovan/luabuild
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
34 lines (34 loc) · 741 Bytes
/
build.bat
File metadata and controls
34 lines (34 loc) · 741 Bytes
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
@echo off
rem do we already have lake?
for %%X in (lake.exe) do (
set LAKE=%%~$PATH:X
if defined LAKE goto :lake
)
:outf
for %%X in (lua.exe,lua51.exe,luajit.exe) do (
set LUA="%%~$PATH:X"
if defined LUA goto :lua
)
echo no lua available...get lake.exe!!
exit /b
:lua
%LUA% -llfs -e "print 'OK!'" 2>&1 | find "OK!" > nul
if %errorlevel% neq 0 (
echo luafilesystem not installed for %LUA%
exit /b
)
set LAKE=%LUA% lake
goto :go
:lake
rem if it's a batch needs special treatment
echo %LAKE% | find ".bat"
set LAKE="%LAKE%"
if %errorlevel% equ 0 set LAKE=call %LAKE%
:go
rem and go!
%LAKE% %*
rem can now install the rest
if %errorlevel% equ 0 (
echo installing...
%LAKE% install.lua
)