lua version detection of the game would trigger even if conf.lua wasn't present

This commit is contained in:
Antonin Décimo
2014-06-23 11:21:57 +02:00
parent 6dd5b9549c
commit 9253fbcaf5

View File

@@ -188,7 +188,7 @@ RELEASE_OSX=false
RELEASE_WIN_32=false
RELEASE_WIN_64=false
if [ "$FOUND_LUA" = true ]; then
if [ "$FOUND_LUA" = true ] && [ -f "conf.lua" ]; then
LOVE_VERSION_AUTO=$(lua -e 'f = loadfile("conf.lua"); t, love = {window = {}, modules = {}}, {}; f(); love.conf(t); print(t.version)')
else
LOVE_VERSION_AUTO=$(grep -Eo -m 1 "t.version = \"[0-9]+.[0-9]+.[0-9]+\"" conf.lua 2> /dev/null | grep -Eo "[0-9]+.[0-9]+.[0-9]+")