2020-05-12 05:09:41 +10:00
|
|
|
#!/bin/bash
|
|
|
|
LUA=${LUA:-lua}
|
2023-08-01 20:44:14 +10:00
|
|
|
KVAR=${1:-base}
|
2019-11-05 14:06:19 +11:00
|
|
|
rm -r target/*
|
2020-05-12 16:59:17 +10:00
|
|
|
mkdir -p target/doc &>/dev/null
|
2023-08-01 17:58:27 +10:00
|
|
|
$LUA build.lua kcfg/$KVAR.cfg target/init.lua
|
2023-08-01 20:44:14 +10:00
|
|
|
echo _OSVERSION=\"PsychOS 2.0a3-$(git rev-parse --short HEAD)-$KVAR\" > target/version.lua
|
2019-11-06 14:01:10 +11:00
|
|
|
cat target/version.lua target/init.lua > target/tinit.lua
|
|
|
|
mv target/tinit.lua target/init.lua
|
2023-07-04 18:25:11 +10:00
|
|
|
cp -r service/ lib/ cfg/ exec/ target/
|
2020-03-18 14:02:58 +11:00
|
|
|
rm target/version.lua
|
2020-05-13 01:29:44 +10:00
|
|
|
rm -r doc/ &>/dev/null
|
2020-05-12 12:04:47 +10:00
|
|
|
$LUA finddesc.lua doc/ $(find lib/ module/ -type f|sort)
|
2020-05-12 16:59:17 +10:00
|
|
|
$LUA gendoc.lua target/doc/kernel.dict $(find module/ -type f|sort)
|
2020-05-12 16:11:51 +10:00
|
|
|
pandoc doc/apidoc.md docs-metadata.yml --template=template.tex -o doc/apidoc.pdf
|