From 391ffa73dfa46beea7dff2c9789a5f56a39227c4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 21 Aug 2010 11:40:45 -0400 Subject: Migrate to using uzbl-dir util script --- examples/data/scripts/insert_bookmark.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'examples/data/scripts/insert_bookmark.sh') diff --git a/examples/data/scripts/insert_bookmark.sh b/examples/data/scripts/insert_bookmark.sh index 4d29ad6..201bae0 100755 --- a/examples/data/scripts/insert_bookmark.sh +++ b/examples/data/scripts/insert_bookmark.sh @@ -1,7 +1,9 @@ #!/bin/sh -[ -d "${XDG_DATA_HOME:-$HOME/.local/share}/uzbl" ] || exit 1 -file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/bookmarks +source $UZBL_UTIL_DIR/uzbl-dir.sh + +[ -d "$UZBL_DATA_DIR" ] || exit 1 +[ -w "$UZBL_BOOKMARKS_FILE" ] || exit 1 which zenity &>/dev/null || exit 2 url=$6 @@ -14,5 +16,5 @@ url=$(echo $entry | awk '{print $1}') # TODO: check if already exists, if so, and tags are different: ask if you want to replace tags echo "$entry" >/dev/null #for some reason we need this.. don't ask me why -echo -e "$entry" >> $file +echo -e "$entry" >> $UZBL_BOOKMARKS_FILE true -- cgit v1.2.3