summaryrefslogtreecommitdiff
path: root/lib/make/ThornDoc
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-13 18:58:00 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-13 18:58:00 +0000
commit51954fb29795ea4a9f0dc331180e50a7791463a3 (patch)
tree96d9bcc81bdbe0dd479b06455c0fac2943bc6e0b /lib/make/ThornDoc
parentb4caf9b4d2f454ad63d58159a029c75c28d566f0 (diff)
Add commands "make ThornDoc" and "make ArrangementDoc" to prepare the
documentation for single thorns and arrangements. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3433 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/ThornDoc')
-rwxr-xr-xlib/make/ThornDoc45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/make/ThornDoc b/lib/make/ThornDoc
new file mode 100755
index 00000000..67a36ed7
--- /dev/null
+++ b/lib/make/ThornDoc
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Create all thorn documentations
+# (C) 2003/05/24 Erik Schnetter <schnetter@uni-tuebingen.de>
+# $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/ThornDoc,v 1.1 2003-10-13 18:58:00 schnetter Exp $
+
+echo "Creating thorn documentations..."
+
+# Selected thorn; process all thorns if this is empty
+selection="$1"
+
+for arr in `cd arrangements; echo *`; do
+ if test -d arrangements/$arr; then
+ for th in `cd arrangements/$arr; echo *`; do
+ if test -d arrangements/$arr/$th; then
+ if test -z "$selection" || test "$th" == "$selection"; then
+ if test -e arrangements/$arr/$th/doc/documentation.tex; then
+ echo " Processing thorn $arr/$th..."
+
+ mkdir doc/ThornDoc 2> /dev/null
+ mkdir doc/ThornDoc/$arr 2> /dev/null
+ mkdir doc/ThornDoc/$arr/$th 2> /dev/null
+ (
+ cd doc/ThornDoc/$arr/$th
+ rm -f documentation.tex documentation.dvi documentation.ps
+ path=../../../../arrangements/$arr/$th/doc
+ sed -e 's+\(\\includegraphics.*\){ *\(.*\) *}+\1{'"$path"'/\2}+g' < $path/documentation.tex > documentation.tex
+
+ {
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ dvips documentation.dvi -o documentation.ps > DVIPS_MESSAGES 2>&1
+ } ||
+ echo " ERROR: Could not create documentation (check for latex errors)"
+ )
+
+ fi # if thorn has documentation
+ fi # if thorn is enabled
+ fi
+ done # for thorns
+ fi
+done # for arrangements
+
+echo " Created thorn documentations in doc/ThornDoc directory."
+echo " Done."