diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-26 16:02:06 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-26 16:02:06 +0200 |
commit | 7563101f66634c77f0d6878473cc6e46a7e3ff59 (patch) | |
tree | 5142501ad22fadff939dcc8a4360fb98861301b7 /extra/insert_bookmark.sh | |
parent | 9474bb8edd588e458dff418e5aaec44cc735f851 (diff) |
better documented how scripts should work + refactored sample implementations
Diffstat (limited to 'extra/insert_bookmark.sh')
-rwxr-xr-x[-rw-r--r--] | extra/insert_bookmark.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extra/insert_bookmark.sh b/extra/insert_bookmark.sh index 3df6086..083a4b4 100644..100755 --- a/extra/insert_bookmark.sh +++ b/extra/insert_bookmark.sh @@ -1,11 +1,9 @@ #!/bin/bash -# $1 should be the uri you want to bookmark file=bookmarks -[ -z "$1" ] && exit 1 which zenity &>/dev/null || exit 2 -entry=`zenity --entry --text="Add bookmark. add tags at the end, separated by commas" --entry-text="$1"` +entry=`zenity --entry --text="Add bookmark. add tags at the end, separated by commas" --entry-text="$5"` url=`awk '{print $1}' <<< $entry` # TODO: check if already exists, if so, and tags are different: ask if you want to replace tags echo "$entry" >> $file |