X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=blobdiff_plain;f=bkmk2db;h=4eae2eb6244e2d3387d5be147e678b65e99a78c6;hp=1874e28b122ff863d715a9b157406cc4ebe8fcf6;hb=96e39d55c791326368ff14d538850e14ba5a2c97;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556 diff --git a/bkmk2db b/bkmk2db index 1874e28..4eae2eb 100755 --- a/bkmk2db +++ b/bkmk2db @@ -1,18 +1,27 @@ #! /bin/sh +# Convert bookmarks to DB +# +# This file is a part of Bookmarks database and Internet robot. +# +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" +# __license__ = "GNU GPL" -PATH=$HOME/lib/bookmarks_db:$PATH +. "`dirname \"$0\"`"/set-path if [ ! -f ./bookmarks_db.pickle -a ! -f ./bookmarks_db.flad ]; then if [ -f ./bookmarks.html ]; then - BKMK= - elif [ -f $HOME/.netscape/bookmarks.html ]; then - BKMK=$HOME/.netscape/bookmarks.html + BKMK=bookmarks.html + elif [ -f "$HOME/.mozilla/bookmarks.html" ]; then + BKMK="$HOME/.mozilla/bookmarks.html" + elif [ -f "$HOME/.netscape/bookmarks.html" ]; then + BKMK="$HOME/.netscape/bookmarks.html" else echo Cannot find bookmarks.html, aborted exit 1 fi - bkmk2db.py $BKMK || exit 1 + bkmk2db.py "$BKMK" || exit 1 elif [ -f ./bookmarks_db.pickle -a -f ./bookmarks.html -a ./bookmarks.html -nt ./bookmarks_db.pickle ]; then bkmk2db.py || exit 1