diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 21:13:43 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 22:32:50 -0500 |
commit | 83a8c242f2cd350e0a8d0700179aa8c45a28ed20 (patch) | |
tree | 3cd06219faa4358a8a10b6608881ec81d007e3b7 /examples | |
parent | 5f2a6b9371fcf2ca78143cd255242e1cacac6ad1 (diff) |
Use a better check for write permission
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/data/scripts/history.sh | 2 | ||||
-rwxr-xr-x | examples/data/scripts/insert_bookmark.sh | 3 |
2 files changed, 2 insertions, 3 deletions
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 |