-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added helper scripts to set up local luarocks install
- Loading branch information
1 parent
5dc5089
commit cea33bd
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/.luarocks | ||
/luarocks.bat | ||
/lua.bat | ||
/luarocks_tree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
call %~dp0setup_local_luarocks.bat | ||
cd %~dp0\.. | ||
del src\tlcheck.lua | ||
call luarocks\bin\tl.bat gen src\tlcheck.tl -o src\tlcheck.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -ex | ||
cd `dirname $BASH_SOURCE`/.. | ||
rm -rf ./gen | ||
mkdir ./gen | ||
mkdir ./gen/lusc | ||
mkdir ./gen/lusc/internal | ||
mkdir ./gen/lusc/tests | ||
tl gen src/lusc/init.tl -o gen/lusc/init.lua | ||
tl gen src/lusc/internal/util.tl -o gen/lusc/internal/util.lua | ||
cp src/lusc/internal/queue.lua gen/lusc/internal/queue.lua | ||
tl gen src/lusc/tests/async_helper.tl -o gen/lusc/tests/async_helper.lua | ||
tl gen src/lusc/tests/lusc_spec.tl -o gen/lusc/tests/lusc_spec.lua | ||
tl gen src/lusc/tests/setup.tl -o gen/lusc/tests/setup.lua | ||
tl gen src/lusc/luv_async.tl -o gen/lusc/luv_async.lua | ||
tl gen src/lusc/tests/luv_async_spec.tl -o gen/lusc/tests/luv_async_spec.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
rem Navigate to the root of the repo | ||
cd %~dp0\.. | ||
|
||
rem Check if the local luarocks tree is already initialized | ||
if not exist "luarocks" ( | ||
echo Initializing local LuaRocks tree... | ||
luarocks init --tree=./luarocks | ||
) else ( | ||
echo Local LuaRocks tree already exists. | ||
) | ||
|
||
rem Set the local LuaRocks path | ||
set "LUAROCKS_TREE=%~dp0\..\luarocks" | ||
|
||
rem Install project dependencies from the rockspec | ||
echo Installing project dependencies... | ||
call luarocks make --tree=!LUAROCKS_TREE! | ||
|
||
rem Confirm installations | ||
echo Installed LuaRocks packages: | ||
call luarocks list --tree=!LUAROCKS_TREE! | ||
|
||
endlocal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Navigate to the root of the repo | ||
cd "$(dirname "$0")/.." | ||
|
||
luarocks init --tree=./luarocks_tree | ||
|
||
# Set the local LuaRocks path | ||
LUAROCKS_TREE="$(pwd)/luarocks_tree" | ||
|
||
# Install project dependencies from the rockspec | ||
echo "Installing project dependencies..." | ||
luarocks make --tree="$LUAROCKS_TREE" | ||
|
||
# Confirm installations | ||
echo "Installed LuaRocks packages:" | ||
luarocks list --tree="$LUAROCKS_TREE" |