From 368cfdabbb197875b2c4569e118815a56616558e Mon Sep 17 00:00:00 2001 From: onefang Date: Sat, 4 Jun 2022 09:43:44 +1000 Subject: Add the json builder and parser libaries. --- src/BuildIt.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/BuildIt.sh b/src/BuildIt.sh index 18f9818..883aa3b 100755 --- a/src/BuildIt.sh +++ b/src/BuildIt.sh @@ -29,6 +29,34 @@ fi echo "" echo "" +if [ ! -d git-sub-modules/json-builder ]; then + pushd git-sub-modules >/dev/null + git clone https://github.com/json-parser/json-builder.git + popd >/dev/null +else + pushd git-sub-modules/json-builder >/dev/null + echo "Updating json-builder." +# git pull + popd >/dev/null +fi + +echo "" +echo "" + +if [ ! -d git-sub-modules/json-parser ]; then + pushd git-sub-modules >/dev/null + git clone https://github.com/json-parser/json-parser.git + popd >/dev/null +else + pushd git-sub-modules/json-parser >/dev/null + echo "Updating json-parser." +# git pull + popd >/dev/null +fi + +echo "" +echo "" + if [ ! -d git-sub-modules/luajit ]; then pushd git-sub-modules >/dev/null git clone https://luajit.org/git/luajit-2.0.git @@ -108,9 +136,14 @@ if [ ! -d build/toybox ]; then ln -fs ../toys/sledjchisl/fcgi_SC.h build/toybox/lib ln -fs ../toys/boxes/handlekeys.c build/toybox/lib ln -fs ../toys/boxes/handlekeys.h build/toybox/lib + ln -fs ../../../git-sub-modules/json-builder/json-builder.c build/toybox/lib + ln -fs ../../../git-sub-modules/json-builder/json-builder.h build/toybox/lib + ln -fs ../../../git-sub-modules/json-parser/json.c build/toybox/lib + ln -fs ../../../git-sub-modules/json-parser/json.h build/toybox/lib pushd build/toybox >/dev/null sed -e "s/strend(/tb_strend(/g" -i lib/lib.h + sed -e 's//"json.h"/g' -i lib/json-builder.h find ./ -type f -name "*.c" -exec sed -e "s/strend(/tb_strend(/g" -i {} \; make clean #make defconfig -- cgit v1.1