]> git.pld-linux.org Git - packages/adonthell.git/commitdiff
- s/CONFIG_DIR/ETC_DIR/
authorjuandon <witekfl@pld-linux.org>
Mon, 7 Apr 2003 12:21:33 +0000 (12:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- s/home_etc/etc_dir/

Changed files:
    adonthell-etc_dir.patch -> 1.1

adonthell-etc_dir.patch [new file with mode: 0644]

diff --git a/adonthell-etc_dir.patch b/adonthell-etc_dir.patch
new file mode 100644 (file)
index 0000000..10e2372
--- /dev/null
@@ -0,0 +1,36 @@
+diff -Nru adonthell-0.3.3/src/game.cc adonthell-0.3.3.new/src/game.cc
+--- adonthell-0.3.3/src/game.cc        Mon Sep 30 15:05:41 2002
++++ adonthell-0.3.3.new/src/game.cc    Sat Mar 22 16:26:40 2003
+@@ -39,8 +39,14 @@
+ {
+     Global_data_dir = game_dir;
+ #ifndef WIN32
+-    User_data_dir = getenv ("HOME");
+-    User_data_dir += "/.adonthell";
++    char *etc_dir = getenv("ETC_DIR");
++    if (etc_dir) {
++        User_data_dir = etc_dir;
++        User_data_dir += "/adonthell";
++    } else {
++        User_data_dir = getenv ("HOME");
++        User_data_dir += "/.adonthell";
++    }
+ #else
+     User_data_dir = Global_data_dir;
+ #endif
+diff -Nru adonthell-0.3.3/src/prefs.cc adonthell-0.3.3.new/src/prefs.cc
+--- adonthell-0.3.3/src/prefs.cc       Mon Sep 30 15:05:41 2002
++++ adonthell-0.3.3.new/src/prefs.cc   Sat Mar 22 16:28:26 2003
+@@ -62,7 +62,11 @@
+     // set the path to the adonthellrc file:
+ #ifndef WIN32
+-    adonthellrc = string (getenv ("HOME")) + "/.adonthell";
++    char *etc_dir = getenv("ETC_DIR");
++    if (etc_dir)
++        adonthellrc = string (etc_dir) + "/adonthell";
++    else        
++        adonthellrc = string (getenv ("HOME")) + "/.adonthell";
+ #else
+     adonthellrc = string (".");
+ #endif
This page took 0.077882 seconds and 4 git commands to generate.