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/history.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/history.sh')
-rwxr-xr-x | examples/data/uzbl/scripts/history.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/data/uzbl/scripts/history.sh b/examples/data/uzbl/scripts/history.sh index 69f4034..ccc6b40 100755 --- a/examples/data/uzbl/scripts/history.sh +++ b/examples/data/uzbl/scripts/history.sh @@ -1,3 +1,5 @@ #!/bin/bash #TODO: strip 'http://' part -echo "$8 $6 $7" >> $XDG_DATA_HOME/uzbl/history +file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/history +[ -d `dirname $file` ] || exit 1 +echo "$8 $6 $7" >> $file |