You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
485 B
Bash
16 lines
485 B
Bash
2 years ago
|
#!/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 "};"
|