lua.sh (1190B)
- #!/bin/sh
- set -ex
- cd /extras/lua-*[0-9]/
- pdpmake -C src all CC="$CC -std=gnu99" SYSCFLAGS="-DLUA_USE_LINUX" RANLIB=true
- pdpmake install
- cd /extras/lua-*-tests/
- # musl locales are incomplete
- if grep -F 'os.setlocale("pt_BR") or os.setlocale("ptb")' literals.lua; then
- ed literals.lua <<'EOF'
- /if os.setlocale("pt_BR") or os.setlocale("ptb") then
- c
- if false then
- .
- w
- q
- EOF
- fi
- # -e"_U=true" (basic tests) because otherwise 5.0.0-tests fails:
- #
- # ***** FILE 'main.lua'*****
- # testing stand-alone interpreter
- # progname: lua
- # Lua 5.5.0 Copyright (C) 1994-2025 Lua.org, PUC-Rio
- # (temporary program file used in these tests: /tmp/lua_PNBFje)
- # lua: module 'lib2-v2' not found:
- # no field package.preload['lib2-v2']
- # no file '/usr/local/share/lua/5.5/lib2-v2.lua'
- # *snip*
- # stack traceback:
- # [C]: in function 'require'
- # [C]: in ?
- # lua: main.lua:67: exit
- # stack traceback:
- # [C]: in global 'assert'
- # main.lua:67: in local 'RUN'
- # main.lua:230: in main chunk
- # (...tail calls...)
- # all.lua:158: in main chunk
- # [C]: in ?
- #
- lua -e"_U=true" all.lua