#! /bin/sh
-# Mk-distr script.
+# Helper script called from Makefile
#
-# This file is a part of Bookmarks Database and Internet robot.
-# Author: Oleg BroytMann <phd@phd.pp.ru>.
-# Copyright: (C) 2004-2008 PhiloSoft Design.
-# License: GPL.
-
-
-# __version__ = \
-# __revision__ = "$Id$"
-# __date__ = "$Date$"[7:-2]
-# __author__ = "Oleg Broytmann <phd@phd.pp.ru>"
-# __copyright__ = "Copyright (C) 2004-2008 PhiloSoft Design"
-
+# This file is a part of Bookmarks database and Internet robot.
+#
+# __author__ = "Oleg Broytman <phd@phdru.name>"
+# __copyright__ = "Copyright (C) 2000-2015 PhiloSoft Design"
+# __license__ = "GNU GPL"
-error() {
- echo "$@"
- exit 1
-}
-if [ -z "$1" ]; then
- error "No Subversion URI specified, program aborted"
-fi
+umask 022 &&
+prog_dir="`pwd`" &&
+git archive --format=tar --prefix=bookmarks_db/ "${1:-HEAD}" |
+ (cd "$HOME/tmp" && exec tar xf -) &&
-umask 022
-cd "$HOME/work" || exit 1
-svn export "$1" bookmarks_db || exit 1
-cd bookmarks_db && make fulldistr && \
+cd "$HOME/tmp/bookmarks_db" &&
+make fulldistr &&
cd .. && exec rm -rf bookmarks_db