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 submodule update --init -- lvgl 10cd lvgl 11git checkout $CURRENT_REF 12cd .. 13git submodule update --init -- lv_drivers 14mkdir cmbuild 15cd cmbuild 16emcmake cmake .. -DLVGL_CHOSEN_DEMO=lv_example_noop -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache 17emmake make -j$(nproc) 18rm -rf CMakeFiles 19cd ../.. 20cp -a emscripten_builder/cmbuild docs/_static/built_lv_examples 21