From 900a0180ba77ffc5b382e31d546bb13a6ec2ab7d Mon Sep 17 00:00:00 2001 From: Takahiro Terada Date: Thu, 26 Mar 2026 15:05:20 +0900 Subject: [PATCH] setup-emlinux: Add generetad version comment to local.conf Add EMLinux version and date it was created as comment to local.conf generated by setup-emlinux script. With this change, it becomes easier to find configuration errors caused by EMLinux updates when reusing an old local.conf. Example comment added to local.conf: ``` # The above settings were generated in EMLinux 2.13 on 2026-03-27 ``` Signed-off-by: Takahiro Terada --- scripts/setup-emlinux | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/setup-emlinux b/scripts/setup-emlinux index b9dd53a2..fe6ee565 100755 --- a/scripts/setup-emlinux +++ b/scripts/setup-emlinux @@ -8,6 +8,20 @@ fi clean_up() { unset EML_BUILDDIR EML_BUILDDIR_SETUP_DONE REPOS EML_HOOKS + unset get_emlinux_version +} + +get_emlinux_version() +{ + tagname="2.x" + if [ -f "${REPOS}/meta-emlinux/conf/distro/include/emlinux.inc" ]; then + tmpver=$(grep '^DISTRO_VERSION *= *' ${REPOS}/meta-emlinux/conf/distro/include/emlinux.inc) + tmpver=$(echo ${tmpver//\'/\"} | cut -d'"' -f2) + if [ -n "${tmpver}" ]; then + tagname="${tmpver}" + fi + fi + echo "${tagname} " } # save error during 'source setup-emlinux' @@ -73,6 +87,7 @@ if [ -z "$TEMPLATECONF" ] && [ "${EML_BUILDDIR_SETUP_DONE}" = "false" ]; then source ${EML_HOOKS}/$hook done fi + echo "# The above settings were generated in EMLinux $(get_emlinux_version)on $(date '+%Y-%m-%d')" >> conf/local.conf fi clean_up