1#!/bin/bash 2# Credit: https://stackoverflow.com/a/4774063 3SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" 4TMPENVFILE=$(mktemp /tmp/lvgl.script.XXXXXX) 5cat $SCRIPTPATH/../lvgl.h | grep "#define LVGL_VERSION_" | sed 's/#define //g' | sed -r 's/\s+/=/' > $TMPENVFILE 6. $TMPENVFILE 7rm $TMPENVFILE 8echo $LVGL_VERSION_MAJOR.$LVGL_VERSION_MINOR 9