diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 11:58:12 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
| commit | d1e854908ae9b8f20fa7209bcf8daed74e08fea0 (patch) | |
| tree | 945d6096d6c198e274cbb0e3e412b6ebeeade38c | |
| parent | 6c458fbfbf1c542036af2adf11f4311b0413f663 (diff) | |
| download | luarocks-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.
| -rwxr-xr-x | teal.sh | 31 |
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 | |||
| 5 | cd $(dirname $0)/src | ||
| 6 | |||
| 7 | i=0 | ||
| 8 | for tealname in $(find . -name "*.tl" -not -name "*.d.tl") | ||
| 9 | do | ||
| 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 | ||
| 16 | done | ||
| 17 | |||
| 18 | # Final message: | ||
| 19 | |||
| 20 | if [ "$1" = "--all" ] | ||
| 21 | then | ||
| 22 | what="rebuilt" | ||
| 23 | else | ||
| 24 | what="needed rebuilding" | ||
| 25 | fi | ||
| 26 | if [ "$i" = 1 ] | ||
| 27 | then | ||
| 28 | echo "$i file $what." | ||
| 29 | else | ||
| 30 | echo "$i files $what." | ||
| 31 | fi | ||
