r9057 - packages/trunk/glest/debian

Siegfried-Angel Gevatter Pujals rainct-guest at alioth.debian.org
Sat Mar 7 21:39:31 UTC 2009


Author: rainct-guest
Date: 2009-03-07 21:39:31 +0000 (Sat, 07 Mar 2009)
New Revision: 9057

Modified:
   packages/trunk/glest/debian/changelog
   packages/trunk/glest/debian/glest.sh
Log:
Move configuration files from ~/.glest to ~/.config/glest.

Modified: packages/trunk/glest/debian/changelog
===================================================================
--- packages/trunk/glest/debian/changelog	2009-03-07 21:32:54 UTC (rev 9056)
+++ packages/trunk/glest/debian/changelog	2009-03-07 21:39:31 UTC (rev 9057)
@@ -36,6 +36,7 @@
        old (setting are not preserved).
      - Create directory ~/.glest/screens for the screenshots (Closes: #505919).
      - Do not create a "docs" symlink amymore (LP: #226584).
+     - Move configuration files from ~/.glest to ~/.config/glest.
   * debian/glest.6:
      - Update the manpage for Glest 3 (Closes: #505917).
 

Modified: packages/trunk/glest/debian/glest.sh
===================================================================
--- packages/trunk/glest/debian/glest.sh	2009-03-07 21:32:54 UTC (rev 9056)
+++ packages/trunk/glest/debian/glest.sh	2009-03-07 21:39:31 UTC (rev 9057)
@@ -1,8 +1,22 @@
 #!/bin/sh
+
 MAINDIR=/usr/share/games/glest
-DIR=$HOME/.glest
-[ -d $DIR ] || mkdir $DIR
+BASEDIR="$XDG_CONFIG_HOME"
+if [ -z "$BASEDIR" ]; then
+    BASEDIR="$HOME/.config"
+fi
+DIR="$BASEDIR/glest"
+if [ ! -d "$DIR" ]; then
+    if [ -d "$HOME/.glest" ]; then
+        # Move the configuration directory to ~/.config
+        mkdir -p $BASEDIR
+        mv "$HOME/.glest" "$DIR"
+    else
+        mkdir $DIR
+    fi
+fi
 cd $DIR
+
 if [ -f glest.ini ]; then
     # Update for Glest 3.2.1
     sed -i 's/\.lng//' glest.ini
@@ -11,8 +25,7 @@
         sed -i "s/${language}/english/" glest.ini
     # If the configuration file is too old, replace it
     grep AutoTest glest.ini >/dev/null 2>&1
-    if [ $? -ne 0 ]
-    then
+    if [ $? -ne 0 ]; then
         mv glest.ini glest.ini.bck
         cp /usr/lib/glest/glest.ini .
         [ -h docs ] || unlink docs




More information about the Pkg-games-commits mailing list