aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xteal.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/teal.sh b/teal.sh
new file mode 100755
index 00000000..86420139
--- /dev/null
+++ b/teal.sh
@@ -0,0 +1,31 @@
1#!/usr/bin/env bash
2
3# Quick Teal build script while we don't have Cyan integration yet
4
5cd $(dirname $0)/src
6
7i=0
8for tealname in $(find . -name "*.tl" -not -name "*.d.tl")
9do
10 luaname=$(echo $tealname | sed 's/.tl$/.lua/g')
11 if [ $tealname -nt $luaname ] || [ "$1" = "--all" ]
12 then
13 tl gen --check -I ../types $tealname -o $luaname
14 i=$[i+1]
15 fi
16done
17
18# Final message:
19
20if [ "$1" = "--all" ]
21then
22 what="rebuilt"
23else
24 what="needed rebuilding"
25fi
26if [ "$i" = 1 ]
27then
28 echo "$i file $what."
29else
30 echo "$i files $what."
31fi