blob: 212845f532bf5c87aa07928742e94f50e1af1859 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
|