From ec30cd39986fe26d3fbad67a577cc2742fcf5b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 15 Sep 2013 05:13:47 +0200 Subject: Add additional k => tde renaming to r14-xdg-update Add r14-xdg-update version index to allow automatic rerun --- starttde | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'starttde') diff --git a/starttde b/starttde index 0728dcb66..1eb3711b1 100644 --- a/starttde +++ b/starttde @@ -280,22 +280,15 @@ export DESKTOP_SESSION=trinity if [ -d "$tdehome" ]; then # Run some R14 updates. - R14_UPDATED="`$TDEDIR/bin/kreadconfig --file kdeglobals --group "R14 XDG Updates" --key Updated`" - if [ "$R14_UPDATED" = "true" ]; then - # There were massive renaming changes long after the original XDG renaming changes. - # The r14-xdg-update script needs to be run again to ensure users have many rc - # config files renamed. So despite the key Updated=true we run the script again with - # to make those changes for the user. Otherwise strange things happen. We select - # some rc config files that will be created automatically under the new changes. - # If those rc files do not exist then we presume the r14-xdg-update script needs to be - # run again. There is no harm in running the script multiple times. - if [ ! -f $TDEHOME/share/config/tdeconf_updaterc ] || [ ! -f $TDEHOME/share/config/tdelaunchrc ]; then - R14_UPDATED="false" - fi + R14_UPDATED="`$TDEDIR/bin/kreadconfig --file kdeglobals --group "R14 XDG Updates" --key Updated --default false`" + R14_VERSION="`$TDEDIR/bin/kreadconfig --file kdeglobals --group "R14 XDG Updates" --key Version --default 0`" + if [ -e $TDEDIR/bin/r14-xdg-update ]; then + # Script version index is used to allow automatic rerun + R14_SCRIPT="`sed -n "s/SCRIPT_VERSION=\([0-9]*\)/\1/p" $TDEDIR/bin/r14-xdg-update`" else - R14_UPDATED="false" + R14_SCRIPT=0 fi - if [ "$R14_UPDATED" != "true" ]; then + if [ "$R14_UPDATED" != "true" ] || [ "$R14_VERSION" -lt "$R14_SCRIPT" ]; then if [ -e $TDEDIR/bin/r14-xdg-update ]; then sh $TDEDIR/bin/r14-xdg-update EXIT_CODE="$?" -- cgit v1.2.1