summaryrefslogtreecommitdiff
path: root/lib/lvgl/scripts/genexamplelist.sh
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-06-01 15:41:47 +1000
committerjacqueline <me@jacqueline.id.au>2023-06-01 15:41:47 +1000
commitdd27c3530432ea0b09f01e604bf577f31d8ef841 (patch)
treebbf86cf81a78f0ff0b07f31f1c390db473f26fd3 /lib/lvgl/scripts/genexamplelist.sh
parent6fd588e970470b15936187980829916d0dbe77bb (diff)
downloadtangara-fw-dd27c3530432ea0b09f01e604bf577f31d8ef841.tar.gz
convert lvgl from submodule to a plain old directory
Diffstat (limited to 'lib/lvgl/scripts/genexamplelist.sh')
m---------lib/lvgl0
-rwxr-xr-xlib/lvgl/scripts/genexamplelist.sh15
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/lvgl b/lib/lvgl
deleted file mode 160000
-Subproject 0732400e7b564dd0e7dc4a924619d8e19c5b23a
diff --git a/lib/lvgl/scripts/genexamplelist.sh b/lib/lvgl/scripts/genexamplelist.sh
new file mode 100755
index 00000000..6547c002
--- /dev/null
+++ b/lib/lvgl/scripts/genexamplelist.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+echo "/* Autogenerated */"
+echo '#include <stddef.h>'
+echo '#include "examplelist.h"'
+TMPFILE=$(mktemp)
+find examples demos -name \*.h | xargs grep -hE "^void lv_(example|demo)" | sed 's/(/ /g' | awk '{print $2}' > $TMPFILE
+cat $TMPFILE | while read -r line; do
+echo "extern void ${line}(void);"
+done
+echo "const struct lv_ci_example lv_ci_example_list[] = {"
+cat $TMPFILE | while read -r line; do
+echo " { \"$line\", $line },";
+done
+echo " { NULL, NULL }"
+echo "};"