From d1e854908ae9b8f20fa7209bcf8daed74e08fea0 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 21 Oct 2024 11:58:12 -0300 Subject: Temporary script for rebuilding sources. We will replace this with Cyan soon, since Cyan runs much faster by rebuilding the project in one go using the module dependency graph. --- teal.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 teal.sh diff --git a/teal.sh b/teal.sh new file mode 100755 index 00000000..86420139 --- /dev/null +++ b/teal.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Quick Teal build script while we don't have Cyan integration yet + +cd $(dirname $0)/src + +i=0 +for tealname in $(find . -name "*.tl" -not -name "*.d.tl") +do + luaname=$(echo $tealname | sed 's/.tl$/.lua/g') + if [ $tealname -nt $luaname ] || [ "$1" = "--all" ] + then + tl gen --check -I ../types $tealname -o $luaname + i=$[i+1] + fi +done + +# Final message: + +if [ "$1" = "--all" ] +then + what="rebuilt" +else + what="needed rebuilding" +fi +if [ "$i" = 1 ] +then + echo "$i file $what." +else + echo "$i files $what." +fi -- cgit v1.2.3-55-g6feb