1#!/bin/bash 2echo "/* Autogenerated */" 3echo '#include <stddef.h>' 4echo '#include "examplelist.h"' 5TMPFILE=$(mktemp) 6find examples demos -name \*.h | xargs grep -hE "^void lv_(example|demo)" | sed 's/(/ /g' | awk '{print $2}' > $TMPFILE 7cat $TMPFILE | while read -r line; do 8echo "extern void ${line}(void);" 9done 10echo "const struct lv_ci_example lv_ci_example_list[] = {" 11cat $TMPFILE | while read -r line; do 12echo " { \"$line\", $line },"; 13done 14echo " { NULL, NULL }" 15echo "};" 16