summaryrefslogtreecommitdiffstats
path: root/tde_show_license_info
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-03-26 01:09:47 +0900
committerMichele Calgaro <[email protected]>2023-03-27 10:33:57 +0900
commitb957aab3e4e0c1b61a5701a5e4fee58a20aed7a8 (patch)
treed2fe97e849c7cf7f8c4fd88d1e2356830536c249 /tde_show_license_info
parente8208c1dfb4dcd17b1168ac2614aa8d5b761f3fd (diff)
downloadtdebase-b957aab3e4e0c1b61a5701a5e4fee58a20aed7a8.tar.gz
tdebase-b957aab3e4e0c1b61a5701a5e4fee58a20aed7a8.zip
Added TDE license info dialog
Signed-off-by: Michele Calgaro <[email protected]> Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'tde_show_license_info')
-rw-r--r--tde_show_license_info28
1 files changed, 28 insertions, 0 deletions
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
+