cgal/Packages/Manual/scripts/to_postscript_letter

46 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
if [ $# -ne 0 ]; then
DOCDIRS="$*"
elif [ -f wrapper.dvi ]; then
DOCDIRS="."
elif [ -f docdirs ] ; then
DOCDIRS=`cat docdirs`
else
DOCDIRS=""
fi
# add the directories (and their subdirectories) to the TEXINPUT variable
# so dvips knows where to get the pictures
for DIR in ${DOCDIRS}; do
cd $DIR
echo "to_postscript_letter: Now in directory $DIR..."
if [ -f docdirs ]; then
DOC_SUBDIRS=`cat docdirs`
for SUBDIR in $DOC_SUBDIRS; do
TEXINPUTS=$TEXINPUTS:$SUBDIR
done
fi
export TEXINPUTS
CURR_DIR=`pwd`
if [ -f wrapper.dvi ]; then
case $CURR_DIR in
*installation) dvips -t letter -o installation_letter.ps wrapper;;
*general) dvips -t letter -o general_intro_letter.ps wrapper;;
*kernel) dvips -t letter -o kernel_letter.ps wrapper;;
*kernel_d) dvips -t letter -o kernel_d_letter.ps wrapper;;
*basic) dvips -t letter -o basic_lib_letter.ps wrapper;;
*support) dvips -t letter -o support_lib_letter.ps wrapper;;
*use_of_stl) dvips -t letter -o use_of_stl_letter.ps wrapper;;
*)
echo "UNKNOWN manual part $CURR_DIR; creating ref-manual_letter.ps";
dvips -t letter -o ref-manual_letter.ps wrapper;
esac
else
echo "ERROR: no wrapper.dvi file in directory $DIR"
fi
echo "to_postscript_letter: ... leaving directory $DIR"
cd ..
done