diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 21:16:25 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 21:16:25 +0200 |
commit | 63c75cbb67228924d5dc1c7f45054f40cd2d395f (patch) | |
tree | fcc4dcf9c77afcfcf259cb6a27d14f15b4afc08a /examples/data/uzbl/scripts/formfiller.sh | |
parent | 67b0fc24261282130bdb86b5f902ccf524d22b77 (diff) |
be more friendly to people who have no XDG variables set + bitter checking and such
Diffstat (limited to 'examples/data/uzbl/scripts/formfiller.sh')
-rwxr-xr-x | examples/data/uzbl/scripts/formfiller.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/data/uzbl/scripts/formfiller.sh b/examples/data/uzbl/scripts/formfiller.sh index d54c626..bbb9d1a 100755 --- a/examples/data/uzbl/scripts/formfiller.sh +++ b/examples/data/uzbl/scripts/formfiller.sh @@ -12,8 +12,9 @@ # something else (or empty): if file not available: new, otherwise load. -keydir=$XDG_DATA_HOME/uzbl/forms -[ -z "$keydir" ] && exit 1 +keydir=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/forms +[ -d "`dirname $keydir`" ] || exit 1 +[ -d "$keydir" ] || mkdir "$keydir" #editor=gvim editor='urxvt -e vim' |