diff options
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 } |