diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-11-01 10:09:33 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-11-01 10:09:33 +0100 |
commit | a9363df274c555c6480ab89704fdc9fb8dc95b30 (patch) | |
tree | 19d1139bed849c6dd95394546398da4bc1d165a1 /uzbl-browser | |
parent | 6c1ab4ab80943f4610d02db93b61a95c3c1fa69a (diff) |
check for existence of config file and if not copy it, no matter if we had to create the config dir or not
Diffstat (limited to 'uzbl-browser')
-rwxr-xr-x | uzbl-browser | 18 |
1 files changed, 9 insertions, 9 deletions
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 |