#!/bin/sh # refdbnd: creates a new document and sets up a Makefile for use # with RefDB bibliographies # Invocation: refdbnd basename doctype|filename pubtype database style encoding # or: refdbnd (interactive mode) # markus@mhoenicka.de 2002-11-26 # $Id: refdbnd.in,v 1.8.2.5 2005/07/29 21:21:50 mhoenicka Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # user variable defaults defbasename="refdbtest" defdoctype="db43x" defpubtype="book" defdatabase="refdbtest" defstyle="J.Biol.Chem." defencoding="utf-8" defcssfile="" xfile="" encoding="" cssfile="" silent="f" # Makefile-generated defaults maketemplate="/examples/Makefile.template" check_existing_doc() { if [ -e $basename ]; then # guess values from existing file xfile=$basename if grep "^%$doctypeswitch%" < $maketemplate | sed "s%%$pubtype%" | sed "s%%$basename%" | sed "s%%$extension%" | sed "s%