From 378fff75bfcc1fad2c94ec5ee3b9ffd2227004ca Mon Sep 17 00:00:00 2001 From: clemty Date: Sat, 12 Sep 2015 20:27:51 +0200 Subject: [PATCH] don't assume luac is installed --- make.ps1 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/make.ps1 b/make.ps1 index dfcdd8a7bc..785e3e5fff 100644 --- a/make.ps1 +++ b/make.ps1 @@ -180,15 +180,23 @@ elseif ($command -eq "check") } elseif ($command -eq "check-scripts") { - foreach ($script in ls "mods/*/maps/*/*.lua") + if ((Get-Command "luac.exe" -ErrorAction SilentlyContinue) -ne $null) { - luac -p $script + echo "Testing Lua scripts..." + foreach ($script in ls "mods/*/maps/*/*.lua") + { + luac -p $script + } + foreach ($script in ls "lua/*.lua") + { + luac -p $script + } + echo "Check completed!" } - foreach ($script in ls "lua/*.lua") + else { - luac -p $script + echo "luac.exe could not be found. Please install Lua." } - echo "Check successfull!" } elseif ($command -eq "docs") {