Skip to content

Commit

Permalink
v1 of make.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hoff committed Sep 8, 2012
1 parent ac8bad3 commit aaad47a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ osx/love.app
redditors.txt
src/maps/*.lua
venv
tmx2lua*
37 changes: 37 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
setlocal EnableDelayedExpansion
echo off
cls
echo.

if exist tmx2lua.exe (
echo Found tmx2lua.exe
goto :tmx2lua
) else (

for %%X in (tmx2lua.exe) do (set FOUND=%%~$PATH:X)

if "%FOUND%"=="" (
echo Cannot find tmx2lua.exe in the PATH
echo You can download it here: https://github.com/kyleconroy/tmx2lua/downloads
echo.
pause
goto :end
) else (
echo found %FOUND%
goto :tmx2lua
)
)
goto :end

:tmx2lua
echo Checking for outdated .lua files
for %%i in (src\maps\*.tmx) do (
FOR /F %%j IN ('DIR /B /O:D src\maps\%%~ni.tmx src\maps\%%~ni.lua') DO SET NEWEST=%%~xj
if "!NEWEST!"==".tmx" (
tmx2lua src\maps\%%~ni.tmx
)
)


:end
echo bye!

0 comments on commit aaad47a

Please sign in to comment.