TDE base libraries and programs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.4KB

  1. #!/bin/sh
  2. #
  3. # A script to open/autostart the release notes in the help
  4. # handbook, but only once.
  5. # Run this script from the global autostart directory.
  6. # When the release version increments, this script will detect the
  7. # difference through tde-config and a respective key in kdeglobals.
  8. # This script then will open the release notes for that next release.
  9. # The only file to update is: tdebase/doc/releasenotes/index.docbook.
  10. # As this script is run as a global TDE autostart app, all
  11. # environment variables should already be set.
  12. if [ "$TDEDIR" = "" ] || [ "$TDEHOME" = "" ]; then
  13. exit 1
  14. fi
  15. RELEASE_VERSION="$( ${TDEDIR}/bin/tde-config --version | sed -n 's|^TDE: ||p' )"
  16. RELEASE_NOTES="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" )"
  17. if [ "$RELEASE_NOTES" = "" ] || [ "$RELEASE_NOTES" != "true" ]; then
  18. echo "[release_notes] Release version: $RELEASE_VERSION"
  19. echo "[release_notes] Release notes: $RELEASE_NOTES"
  20. if ${TDEDIR}/bin/khelpcenter help:/khelpcenter/releasenotes ; then
  21. ${TDEDIR}/bin/kwriteconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" --type bool "true"
  22. fi
  23. RELEASE_NOTES="$( ${TDEDIR}/bin/kreadconfig --file ${TDEHOME}/share/config/kdeglobals --group "Release Notes" --key "$RELEASE_VERSION" )"
  24. echo "[release_notes] Release notes: $RELEASE_NOTES"
  25. fi
  26. unset RELEASE_NOTES RELEASE_VERSION
  27. exit 0