aboutsummaryrefslogtreecommitdiff
path: root/teal.sh
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-10-21 11:58:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-10-21 13:30:51 -0300
commitd1e854908ae9b8f20fa7209bcf8daed74e08fea0 (patch)
tree945d6096d6c198e274cbb0e3e412b6ebeeade38c /teal.sh
parent6c458fbfbf1c542036af2adf11f4311b0413f663 (diff)
downloadluarocks-d1e854908ae9b8f20fa7209bcf8daed74e08fea0.tar.gz
luarocks-d1e854908ae9b8f20fa7209bcf8daed74e08fea0.tar.bz2
luarocks-d1e854908ae9b8f20fa7209bcf8daed74e08fea0.zip
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.
Diffstat (limited to 'teal.sh')
-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