aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/uzbl-browser
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-11-21 23:15:02 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-11-21 23:21:28 -0700
commite660b9de3f4331ebf171735b40eb12105218b2d7 (patch)
tree56b13fa90303205fd1a8bc1c36b75a23ee8305b7 /src/uzbl-browser
parentbb1153c9bc776d0c0dde44bcc055d40c7617a998 (diff)
set UZBL_UTIL_DIR in uzbl-browser, get rid of the scripts_util_dir variable
Diffstat (limited to 'src/uzbl-browser')
-rwxr-xr-xsrc/uzbl-browser18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/uzbl-browser b/src/uzbl-browser
index de4f7af..865447c 100755
--- a/src/uzbl-browser
+++ b/src/uzbl-browser
@@ -10,6 +10,8 @@
# But this shouldn't cause much problems..
PREFIX=/usr/local
+EXAMPLES=$PREFIX/share/uzbl/examples
+
if [ -z "$XDG_DATA_HOME" ]
then
export XDG_DATA_HOME=$HOME/.local/share
@@ -40,13 +42,27 @@ done
# if no config exists yet in the recommended location, put the default (recommended) config there
if [ ! -f $XDG_CONFIG_HOME/uzbl/config ]
then
- if ! cp $PREFIX/share/uzbl/examples/config/config $XDG_CONFIG_HOME/uzbl/config
+ if ! cp "$EXAMPLES"/config/config $XDG_CONFIG_HOME/uzbl/config
then
echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2
exit 3
fi
fi
+# this variable is used by the default helper scripts as a location to
+# load shared code from
+if [ -z "$UZBL_UTIL_DIR" ]
+then
+ if [ -d "$XDG_DATA_HOME"/uzbl/scripts/util ]
+ then
+ UZBL_UTIL_DIR=$XDG_DATA_HOME/uzbl/scripts/util
+ elif [ -d $EXAMPLES/data/scripts/util ]
+ then
+ UZBL_UTIL_DIR=$EXAMPLES/data/scripts/util
+ fi
+ export UZBL_UTIL_DIR
+fi
+
# Uncomment this for a slight speedup at the expense of not having
# stale cookie daemon sockets cleaned up.
#if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ]