[caribou] bin: fix path settings to never include empty path elements. fix typos



commit c27aa5db744d0f66e1be9d65a31586a4e50bcf6d
Author: Dan Winship <danw gnome org>
Date:   Tue May 24 16:27:15 2011 -0400

    bin: fix path settings to never include empty path elements. fix typos
    
    Things like PYTHONPATH="foo:$PYTHONPATH" are bad, because if
    PYTHONPATH isn't previously set, you'll end up with a "" element in
    it, which will be interpreted as ".", which you don't want.
    
    Use some tricky bash syntax to say "add : and $PYTHONPATH if
    PYTHONPATH is set".
    
    Also fix a few typos ("licaribou", etc)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=651005

 bin/antler-keyboard.in     |   14 +++++++-------
 bin/caribou-preferences.in |   14 +++++++-------
 bin/caribou.in             |    8 ++++----
 3 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/bin/antler-keyboard.in b/bin/antler-keyboard.in
old mode 100644
new mode 100755
index adbb61d..35dc200
--- a/bin/antler-keyboard.in
+++ b/bin/antler-keyboard.in
@@ -25,14 +25,14 @@ exec_prefix= exec_prefix@
 
 if [ $script_dir == "@libexecdir@" ]
 then
-  export PYTHONPATH="${prefix}/lib/python PYTHON_VERSION@/site-packages:${PYTHONPATH}"
-  export GI_TYPELIB_PATH="@libdir@/girepository-1.0:${GI_TYPELIB_PATH}"
-  export LD_LIBRARY_PATH="@libdir@:${LD_LIBRARY_PATH}"
-  export XDG_DATA_DIRS="@datadir@:${XDG_DATA_DIRS}"
+  export PYTHONPATH="${prefix}/lib/python PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+  export LD_LIBRARY_PATH="@libdir ${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+  export XDG_DATA_DIRS="@datadir ${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
 else
-  export PYTHONPATH="$(dirname $script_dir):${PYTHONPATH}"
-  export GI_TYPELIB_PATH="$(dirname $script_dir)/licaribou:${GI_TYPELIB_PATH}"
-  export LD_LIBRARY_PATH="$(dirname $script_dir)/licaribou/.lib:${LD_LIBRARY_PATH}"
+  export PYTHONPATH="$(dirname $script_dir)${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="$(dirname $script_dir)/libcaribou${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+  export LD_LIBRARY_PATH="$(dirname $script_dir)/libcaribou/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
   export ANTLER_THEME_PATH="$(dirname $script_dir)/data"
 fi
 
diff --git a/bin/caribou-preferences.in b/bin/caribou-preferences.in
old mode 100644
new mode 100755
index 7c836b0..6621054
--- a/bin/caribou-preferences.in
+++ b/bin/caribou-preferences.in
@@ -25,14 +25,14 @@ exec_prefix= exec_prefix@
 
 if [ $script_dir == "@bindir@" ]
 then
-  export PYTHONPATH="@prefix@/lib/python PYTHON_VERSION@/site-packages:${PYTHONPATH}"
-  export GI_TYPELIB_PATH="@libdir@/girepository-1.0:${GI_TYPELIB_PATH}"
-  export LD_LIBRARY_PATH="@libdir@:${LD_LIBRARY_PATH}"
-  export XDG_DATA_DIRS="@datadir@:${XDG_DATA_DIRS}"
+  export PYTHONPATH="@prefix@/lib/python PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+  export LD_LIBRARY_PATH="@libdir ${LD_LIBRARY_PATH:+:LD_LIBRARY_PATH}"
+  export XDG_DATA_DIRS="@datadir ${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
 else
-  export PYTHONPATH="$(dirname $script_dir):${PYTHONPATH}"
-  export GI_TYPELIB_PATH="$(dirname $script_dir)/licaribou:${GI_TYPELIB_PATH}"
-  export LD_LIBRARY_PATH="$(dirname $script_dir)/licaribou/.lib:${LD_LIBRARY_PATH}"
+  export PYTHONPATH="$(dirname $script_dir)${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="$(dirname $script_dir)/libcaribou${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+  export LD_LIBRARY_PATH="$(dirname $script_dir)/libcaribou/.lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
 fi
 
 @PYTHON@ -c "
diff --git a/bin/caribou.in b/bin/caribou.in
old mode 100644
new mode 100755
index 50bceac..6183ed5
--- a/bin/caribou.in
+++ b/bin/caribou.in
@@ -31,11 +31,11 @@ exec_prefix= exec_prefix@
 
 if [ $script_dir == "@bindir@" ]
 then
-  export PYTHONPATH="@prefix@/lib/python PYTHON_VERSION@/site-packages:${PYTHONPATH}"
-  export GI_TYPELIB_PATH="@libdir@/girepository-1.0":${GI_TYPELIB_PATH}
+  export PYTHONPATH="@prefix@/lib/python PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
 else
-  export PYTHONPATH="$(dirname $script_dir):${PYTHONPATH}"
-  export GI_TYPELIB_PATH="$(dirname $script_dir)/licaribou":${GI_TYPELIB_PATH}
+  export PYTHONPATH="$(dirname $script_dir)${PYTHONPATH:+:$PYTHONPATH}"
+  export GI_TYPELIB_PATH="$(dirname $script_dir)/libcaribou${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}
 fi
 
 @PYTHON@ -c "from caribou.daemon.main import CaribouDaemon; CaribouDaemon().run()"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]