make domnload.sh more portable
[uzbl-mobile] / examples / data / uzbl / scripts / history.sh
index 69f4034..ccc6b40 100755 (executable)
@@ -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