logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

gen.lua (1465B)


  1. cflags{
  2. '-std=c99', '-Wall', '-Wpedantic',
  3. '-Wno-maybe-uninitialized', '-Wno-overflow', '-Wno-format-truncation',
  4. '-D _GNU_SOURCE',
  5. '-D _XOPEN_SOURCE=700',
  6. '-I $dir',
  7. }
  8. lib('libutil.a', [[libutil/(
  9. agetcwd.c
  10. agetline.c
  11. apathmax.c
  12. concat.c
  13. ealloc.c
  14. eprintf.c
  15. estrtol.c
  16. estrtoul.c
  17. explicit_bzero.c
  18. passwd.c
  19. proc.c
  20. putword.c
  21. recurse.c
  22. strlcat.c
  23. strlcpy.c
  24. strtonum.c
  25. tty.c
  26. )]])
  27. local tools = {
  28. {'blkdiscard', 8},
  29. {'chvt', 1},
  30. {'clear', 1},
  31. {'ctrlaltdel', 8},
  32. -- {'df', 1},
  33. {'dmesg', 1},
  34. {'eject', 1},
  35. {'fallocate', 1},
  36. {'free', 1},
  37. {'freeramdisk', 8},
  38. {'fsfreeze', 8},
  39. {'getty', 8},
  40. {'halt', 8},
  41. {'hwclock', 8},
  42. -- {'id', 1},
  43. {'insmod', 8},
  44. {'killall5', 8},
  45. {'last'},
  46. {'lastlog', 8},
  47. {'login', 1},
  48. {'lsmod', 8},
  49. {'lsusb', 8},
  50. {'mesg', 1},
  51. {'mkswap', 8},
  52. {'mount', 8},
  53. {'mountpoint', 1},
  54. {'nologin', 8},
  55. {'pagesize', 1},
  56. {'passwd', 1, '4755'},
  57. {'pidof', 1},
  58. {'pivot_root', 8},
  59. {'ps', 1},
  60. {'pwdx', 1},
  61. {'readahead', 8},
  62. {'respawn', 1},
  63. {'rmmod', 8},
  64. {'stat', 1},
  65. {'stty'},
  66. {'swaplabel', 8},
  67. {'swapoff', 8},
  68. {'swapon', 8},
  69. {'switch_root', 8},
  70. {'sysctl', 8},
  71. -- {'truncate', 1},
  72. {'umount', 8},
  73. {'unshare', 1},
  74. {'uptime', 1},
  75. {'vmstat'},
  76. {'vtallow', 1},
  77. {'watch', 1},
  78. {'who', 1},
  79. }
  80. for _, tool in ipairs(tools) do
  81. local name, sect, mode = tool[1], tool[2], tool[3]
  82. file('bin/'..name, mode or '755', exe(name, {name..'.c', 'libutil.a'}))
  83. if sect then
  84. man{name..'.'..sect}
  85. end
  86. end
  87. fetch 'git'