From 736318a7309f9f808e75ee45c7b2691a77545de6 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 20 Oct 2014 12:43:48 +0200 Subject: [PATCH] More build script fies (lua compiler) --- build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 067ccee..a1a54ed 100644 --- a/build.sh +++ b/build.sh @@ -77,11 +77,13 @@ mkdir -p ../tmp/lua find . -type f -name '*.lua' | while read absfile; do file="lua/$absfile" echo "Compiling $file..." - luac52 -o "../tmp/$file" "$absfile" || ( - echo "Could not compile $file, only copying..." - cp "$absfile" "../tmp/$file" + luac52 -o "../tmp/$file.luac" "$absfile" && ( + rm "/tmp/$file" + mv "/tmp/$file.luac" "/tmp/$file" + ) || ( + echo "Could not compile $file, leaving as is." ) -) +done popd # Create the GMA file