From b957aab3e4e0c1b61a5701a5e4fee58a20aed7a8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 26 Mar 2023 01:09:47 +0900 Subject: Added TDE license info dialog Signed-off-by: Michele Calgaro Signed-off-by: Mavridis Philippe --- tde_show_license_info | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tde_show_license_info (limited to 'tde_show_license_info') diff --git a/tde_show_license_info b/tde_show_license_info new file mode 100644 index 000000000..212845f53 --- /dev/null +++ b/tde_show_license_info @@ -0,0 +1,28 @@ +#!/bin/sh +# +# A script to open/autostart the dialog showing the licenses +# under which TDE components are provided. +# The dialog will be shown once for each TDE minor releases (R14.x.0) + +# As this script is run as a global TDE autostart app, all +# environment variables should already be set. + +if [ "$TDEDIR" = "" ] || [ "$TDEHOME" = "" ]; then + exit 1 +fi + +RELEASE_MINOR_VERSION="$( ${TDEDIR}/bin/tde-config --version | sed -n 's|^TDE: \(R[0-9]\+\.[0-9]\+\)\.[0-9]\+[^0-9]*|\1|p' )" +LICENSE_INFO="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "License Info" --key "${RELEASE_MINOR_VERSION}" )" + +if [ "$LICENSE_INFO" = "" ] || [ "$LICENSE_INFO" != "true" ]; then + echo "[tde_license_info] Release minor version: $RELEASE_MINOR_VERSION" + echo "[tde_license_info] License info: $LICENSE_INFO" + ${TDEDIR}/bin/tde_license_info + ${TDEDIR}/bin/kwriteconfig --file ${TDEHOME}/share/config/kdeglobals --group "License Info" --key "$RELEASE_MINOR_VERSION" --type bool "true" + LICENSE_INFO="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "License Info" --key "$RELEASE_MINOR_VERSION" )" + echo "[tde_license_info] License info: $LICENSE_INFO" +fi + +unset LICENSE_INFO RELEASE_MINOR_VERSION +exit 0 + -- cgit v1.2.1