axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: [Axiom-mail] Re: noweb


From: David MENTRE
Subject: Re: [Axiom-developer] Re: [Axiom-mail] Re: noweb
Date: Mon, 14 Aug 2006 22:54:26 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Hello,

Ok, so why not modifiying 'document' itself, like in:

--start document--
#!/bin/sh

REDIRECT=""
FILE=""
gaby_mode=no

while : ; do
    case "$1" in
        "") break;;
        -o)
            REDIRECT=$2; shift;;
        -gaby-mode)
            gaby_mode=yes;;
        *) 
            FILE=`basename $1 .pamphlet`;;
    esac
    shift
done

latex=`which latex`
if [ "$latex" = "" ] ; then
  echo document ERROR You must install latex first
  exit 1
fi

if [ "$FILE" = "" ] ; then
  echo document ERROR You must provide a file name
  echo "document [ -o redirect ] [ -gaby-mode ] file.pamphlet"
  exit 1
fi

tangle=$AXIOM/bin/lib/notangle
weave=$AXIOM/bin/lib/noweave

$tangle -t8 $FILE.pamphlet >$FILE

if [ "$gaby_mode" == "no" ]; then
    $weave -delay $FILE.pamphlet >$FILE.tex
    if [ "$REDIRECT" == "" ]; then
        $latex $FILE.tex 
        $latex $FILE.tex
    else
        $latex --interaction nonstopmode $FILE.tex >$REDIRECT
        $latex --interaction nonstopmode $FILE.tex >$REDIRECT
    fi
    rm -f $FILE~
    rm -f $FILE.pamphlet~
    rm -f $FILE.log
    rm -f $FILE.tex
    rm -f $FILE.toc
    rm -f $FILE.aux
fi
exit 0
--end document--

Shell Scribe David
-- 
David MENTRE <address@hidden> -- http://wiki.axiom-developer.org/FrontPage




reply via email to

[Prev in Thread] Current Thread [Next in Thread]