release_notes: Use the same method to get the release version (as starttde), minor adjustments

Signed-off-by: Matías Fonzo <selk@dragora.org>
pull/129/head
Matías Fonzo 4 years ago
parent 720d6434da
commit ed1d5dea33
No known key found for this signature in database
GPG Key ID: 3AAF1CEC203A99D5

@ -17,19 +17,19 @@ if [ "$TDEDIR" = "" ] || [ "$TDEHOME" = "" ]; then
exit 1 exit 1
fi fi
RELEASE_VERSION=`$TDEDIR/bin/tde-config --version | grep TDE: | awk '{print $2}'` RELEASE_VERSION="$( ${TDEDIR}/bin/tde-config --version | sed -n 's|^TDE: ||p' )"
RELEASE_NOTES=`$TDEDIR/bin/kreadconfig --file $TDEHOME/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION"` RELEASE_NOTES="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" )"
if [ "$RELEASE_NOTES" = "" ] || [ "$RELEASE_NOTES" != "true" ]; then if [ "$RELEASE_NOTES" = "" ] || [ "$RELEASE_NOTES" != "true" ]; then
echo "[release_notes] Release version: $RELEASE_VERSION" echo "[release_notes] Release version: $RELEASE_VERSION"
echo "[release_notes] Release notes: $RELEASE_NOTES" echo "[release_notes] Release notes: $RELEASE_NOTES"
$TDEDIR/bin/khelpcenter help:/khelpcenter/releasenotes if ${TDEDIR}/bin/khelpcenter help:/khelpcenter/releasenotes ; then
if [ "$?" = "0" ]; then ${TDEDIR}/bin/kwriteconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" --type bool "true"
$TDEDIR/bin/kwriteconfig --file $TDEHOME/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" --type bool "true"
fi fi
RELEASE_NOTES=`$TDEDIR/bin/kreadconfig --file $TDEHOME/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION"` RELEASE_NOTES="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" )"
echo "[release_notes] Release notes: $RELEASE_NOTES" echo "[release_notes] Release notes: $RELEASE_NOTES"
fi fi
unset RELEASE_NOTES unset RELEASE_NOTES RELEASE_VERSION
unset RELEASE_VERSION
exit 0 exit 0

Loading…
Cancel
Save