From 83a8c242f2cd350e0a8d0700179aa8c45a28ed20 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 10 Mar 2011 21:13:43 -0500 Subject: Use a better check for write permission --- examples/data/scripts/history.sh | 2 +- examples/data/scripts/insert_bookmark.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/history.sh b/examples/data/scripts/history.sh index 4b660c3..4b4e970 100755 --- a/examples/data/scripts/history.sh +++ b/examples/data/scripts/history.sh @@ -2,6 +2,6 @@ . "$UZBL_UTIL_DIR/uzbl-dir.sh" -[ -w "$UZBL_HISTORY_FILE" ] || [ ! -a "$UZBL_HISTORY_FILE" ] || exit 1 +>> "$UZBL_HISTORY_FILE" || exit 1 printf "$( date +'%Y-%m-%d %H:%M:%S' ) $UZBL_URI $UZBL_TITLE\n" >> "$UZBL_HISTORY_FILE" diff --git a/examples/data/scripts/insert_bookmark.sh b/examples/data/scripts/insert_bookmark.sh index d4c6773..21a2aac 100755 --- a/examples/data/scripts/insert_bookmark.sh +++ b/examples/data/scripts/insert_bookmark.sh @@ -2,8 +2,7 @@ . "$UZBL_UTIL_DIR/uzbl-dir.sh" -[ -d "$UZBL_DATA_DIR" ] || exit 1 -[ -w "$UZBL_BOOKMARKS_FILE" ] || [ ! -a "$UZBL_BOOKMARKS_FILE" ] || exit 1 +>> "$UZBL_BOOKMARKS_FILE" || exit 1 which zenity >/dev/null 2>&1 || exit 2 -- cgit v1.2.3