1#!/bin/bash 2set -e 3export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" 4CURRENT_REF="$(git rev-parse HEAD)" 5rm -rf emscripten_builder 6git clone https://github.com/lvgl/lv_sim_emscripten.git emscripten_builder 7scripts/genexamplelist.sh > emscripten_builder/examplelist.c 8cd emscripten_builder 9git checkout 45e0bc5c8d3e55cfbcaf8214361d2335b8b9a7b4 10git submodule update --init -- lvgl 11cd lvgl 12git checkout $CURRENT_REF 13cd .. 14git submodule update --init -- lv_drivers 15mkdir cmbuild 16cd cmbuild 17emcmake cmake .. -DLVGL_CHOSEN_DEMO=lv_example_noop -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache 18emmake make -j$(nproc) 19rm -rf CMakeFiles 20cd ../.. 21cp -a emscripten_builder/cmbuild docs/_static/built_lv_examples 22