diff options
Diffstat (limited to 'scripts/genexamplelist.sh')
-rwxr-xr-x | scripts/genexamplelist.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/genexamplelist.sh b/scripts/genexamplelist.sh new file mode 100755 index 000000000..a52049925 --- /dev/null +++ b/scripts/genexamplelist.sh @@ -0,0 +1,15 @@ +#!/bin/bash +echo "/* Autogenerated */" +echo '#include <stddef.h>' +echo '#include "examplelist.h"' +TMPFILE=$(mktemp) +find examples -name \*.h | xargs grep -h "^void lv_example" | 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 "};" |