logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/

lua.sh (1190B)


  1. #!/bin/sh
  2. set -ex
  3. cd /extras/lua-*[0-9]/
  4. pdpmake -C src all CC="$CC -std=gnu99" SYSCFLAGS="-DLUA_USE_LINUX" RANLIB=true
  5. pdpmake install
  6. cd /extras/lua-*-tests/
  7. # musl locales are incomplete
  8. if grep -F 'os.setlocale("pt_BR") or os.setlocale("ptb")' literals.lua; then
  9. ed literals.lua <<'EOF'
  10. /if os.setlocale("pt_BR") or os.setlocale("ptb") then
  11. c
  12. if false then
  13. .
  14. w
  15. q
  16. EOF
  17. fi
  18. # -e"_U=true" (basic tests) because otherwise 5.0.0-tests fails:
  19. #
  20. # ***** FILE 'main.lua'*****
  21. # testing stand-alone interpreter
  22. # progname: lua
  23. # Lua 5.5.0 Copyright (C) 1994-2025 Lua.org, PUC-Rio
  24. # (temporary program file used in these tests: /tmp/lua_PNBFje)
  25. # lua: module 'lib2-v2' not found:
  26. # no field package.preload['lib2-v2']
  27. # no file '/usr/local/share/lua/5.5/lib2-v2.lua'
  28. # *snip*
  29. # stack traceback:
  30. # [C]: in function 'require'
  31. # [C]: in ?
  32. # lua: main.lua:67: exit
  33. # stack traceback:
  34. # [C]: in global 'assert'
  35. # main.lua:67: in local 'RUN'
  36. # main.lua:230: in main chunk
  37. # (...tail calls...)
  38. # all.lua:158: in main chunk
  39. # [C]: in ?
  40. #
  41. lua -e"_U=true" all.lua