diff options
author | Brendan Taylor <whateley@gmail.com> | 2010-10-11 09:46:38 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2010-10-11 09:46:38 -0600 |
commit | e727ba910ddb4aa1eeec96550387915014f4a73f (patch) | |
tree | 5f9a9f2aa661d5361bf072ebc3ae23cdeb92a13a /src | |
parent | c98f8cc6e624a8490a535abedca7e72c1df8bb38 (diff) | |
parent | ee3e5ccc576041baeacf9ee3082d453e2fe74fb6 (diff) |
Merge remote branch 'mathstuf/dev/warn-on-no-config'
Diffstat (limited to 'src')
-rwxr-xr-x | src/uzbl-browser | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/uzbl-browser b/src/uzbl-browser index de4f7af..fabefc4 100755 --- a/src/uzbl-browser +++ b/src/uzbl-browser @@ -40,10 +40,16 @@ 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 [ ! -r $PREFIX/share/uzbl/examples/config/config ] + then + echo "Error: Global config not found; please check if your distribution ships them separately" + exit 3 + fi if ! cp $PREFIX/share/uzbl/examples/config/config $XDG_CONFIG_HOME/uzbl/config then echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 - exit 3 + # Run with the global configs as a last resort + config="--config $PREFIX/share/uzbl/examples/config/config" fi fi @@ -63,4 +69,4 @@ DAEMON_PID=${DAEMON_SOCKET}.pid uzbl-event-manager -va start #fi -exec uzbl-core "$@" --connect-socket $DAEMON_SOCKET +exec uzbl-core "$@" $config --connect-socket $DAEMON_SOCKET |