diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-05-29 23:00:53 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-05-29 23:00:53 -0300 |
commit | 5eecbd6ef771a54b455d96f4033212062d7c3f8f (patch) | |
tree | 9fef3d210df849e82baa763b8b2b885c4806ca96 /build.sh | |
parent | bbb9f04eecc66a9e8e208cc4abc0466697807765 (diff) |
Implement cratera bootstrap
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build.sh b/build.sh index 9b78d8c..6f70eb0 100755 --- a/build.sh +++ b/build.sh @@ -10,10 +10,12 @@ case "$LUA_INTERPRETER" in esac do_build() { - mkdir -p out/lua/cratera/ || exit 1 + mkdir -p out/lua/cratera/prebuilt/ || exit 1 + mkdir -p out/cratera/cratera.cratera.d || exit 1 mkdir -p out/bin || exit 1 # worst tool for this job cp -R src/cratera out/lua/ || exit 1 + cp -R src/cratera.cratera.d out/cratera/ || exit 1 if [ "$ENV_WRAPPER" = '' ]; then printf "#!%s\n" "$LUA_INTERPRETER" >out/bin/cratera || exit 1 else @@ -21,6 +23,7 @@ do_build() { fi cat src/bin/cratera.lua >>out/bin/cratera || exit 1 chmod +x out/bin/cratera || exit 1 + env -i "$LUA_INTERPRETER" src/host/genpath.lua >out/lua/cratera/prebuilt/path.lua || exit 1 } do_test() { @@ -31,6 +34,7 @@ do_test() { LUA_PATH='./out/lua/?.lua;./out/lua/?/init.lua;;' "$LUA_INTERPRETER" test/testp.lua || exit 2 LUA_PATH='./out/lua/?.lua;./out/lua/?/init.lua;;' "$LUA_INTERPRETER" test/testc.lua || exit 2 LUA_PATH='./out/lua/?.lua;./out/lua/?/init.lua;;' "$LUA_INTERPRETER" test/testbc.lua || exit 2 + LUA_PATH='./out/lua/?.lua;./out/lua/?/init.lua;;' CRATERA_PATH='./test/?.cratera;./out/cratera/?.cratera;;' "$LUA_INTERPRETER" test/test_bootstrap.lua || exit 2 # these tests use the cratera interpreter LUA_PATH='./out/lua/?.lua;./out/lua/?/init.lua;;' out/bin/cratera test/tests.cratera || exit 2 } |