#! /bin/bash if [ $# == 0 ] || [ $# == 1 ] then cat < $DESTDIR/testout:context echo $BIBFILES >> $DESTDIR/testout:context export >> $DESTDIR/testout:context [ "$BIBFILES" ] || (echo No bibfiles given ; false) || exit 2 iomode=a for acode in : -h -k:-v -k:-A0 -K:-Aa -k:-AA -s -S:-q \ -r:braces -r:check_y -r:improve -r:opt -r:sort_fld -r:tex_def \ nosuchfile do args=`echo $acode | tr : ' '` stdout=$DESTDIR/testout:$acode stderr=${stdout}@2 case $iomode in a) cmd="$BIBTOOL $args -m ${stdout}@m" echo cat $BIBFILES "|" $cmd ">" $stdout cat $BIBFILES | $cmd > $stdout 2> $stderr ;; aa) echo $BIBTOOL $IBIBFILES $args ">" $stdout $BIBTOOL $IBIBFILES $args > $stdout 2> $stderr ;; *) iomode= cmd="$BIBTOOL $args -M - -o $stdout $BIBFILES" echo $cmd ">" ${stdout}@M $cmd > ${stdout}@M 2> $stderr ;; esac echo [exit code $?] >> $stderr iomode=a$iomode done for auxfile in $AUXFILES do stdout=$DESTDIR/testout:-x`echo $auxfile | tr / :` stderr=${stdout}@2 echo $BIBTOOL -x $auxfile ">" $stdout $BIBTOOL -x $auxfile > $stdout 2> $stderr echo [exit code $?] >> $stderr done exit 0