Change entrypoint function

This commit is contained in:
2025-12-03 18:56:16 +01:00
parent e3dce14c64
commit 4b4c3022eb
7 changed files with 76 additions and 21 deletions

View File

@@ -4,9 +4,25 @@ set -e
echo "#ifndef SYSTEM_PROG_H" > out/system/system_prog.h
echo "#define SYSTEM_PROG_H" >> out/system/system_prog.h
echo "const char* SYSTEM_PROG_JS = \\" >> out/system/system_prog.h
remove_mode=false
while IFS= read -r line; do
if [ "$remove_mode" = true ]; then
remove_mode=false
continue
fi
ESCAPED_LINE=$(echo "$line" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
if echo "$line" | grep -q "___remove_next_line"; then
remove_mode=true
continue
fi
echo "\"${ESCAPED_LINE}\\n\"" >> out/system/system_prog.h
done < out/system/index.js
done < out/system/__.js
echo ";" >> out/system/system_prog.h
echo "#endif" >> out/system/system_prog.h