From a9363df274c555c6480ab89704fdc9fb8dc95b30 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sun, 1 Nov 2009 10:09:33 +0100 Subject: check for existence of config file and if not copy it, no matter if we had to create the config dir or not --- uzbl-browser | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'uzbl-browser') diff --git a/uzbl-browser b/uzbl-browser index 7cc8002..5ff72e9 100755 --- a/uzbl-browser +++ b/uzbl-browser @@ -35,17 +35,17 @@ do echo "could not create $dir" >&2 exit 2 fi - # if we're initialising a new config directory, put the default (recommended) config in it - if [ "$dir" == $XDG_CONFIG_HOME/uzbl ] - then - if ! cp $PREFIX/share/uzbl/examples/config/uzbl/config $XDG_CONFIG_HOME/uzbl/config - then - echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 - exit 3 - fi - fi fi 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/uzbl/config $XDG_CONFIG_HOME/uzbl/config + then + echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 + exit 3 + fi +fi if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ] then -- cgit v1.2.3