Commit 3cf7e5b8 authored by Christopher's avatar Christopher

create_doc(): copy all doc files to tmp dir to support pictures, etc.

parent d8b44a91
......@@ -387,30 +387,30 @@ create_doc()
return 0 #linuxparty.sh soll auch ohne Doku Verzeichnis laufen
fi
DOCFILE=$(mktemp --suffix='.tex')
#DOCFILE=$(mktemp --suffix='.tex')
WORKING_DIR=$(mktemp -d)
cp -a "$DOCUDIR/." "$WORKING_DIR"
for PACKAGE in $INSTALLED_PKGS; do
#zenity and kdialog return quoted package names; nice for apt call but bad here
CLEAN_PACKAGE_NAME=$(echo "$PACKAGE" | tr -d "\" ")
echo "Dokumentation fuer $PACKAGE von ${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex"
if [ -f "${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex" ]; then
#inclue is a bad idea here because pdflatex writes *.aux files to /cdrom
#echo "\\include{${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex}" >> "$DOCFILE"
echo
echo "% from ${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex :" >> "$DOCFILE"
cat "${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex" >> "$DOCFILE"
echo "Dokumentation fuer $PACKAGE von ${WORKING_DIR}/${CLEAN_PACKAGE_NAME}.tex"
if [ -f "${WORKING_DIR}/${CLEAN_PACKAGE_NAME}.tex" ]; then
echo "\\input{${CLEAN_PACKAGE_NAME}.tex}" >> "$WORKING_DIR/DOCUMENTATION.gen.tex"
#cat "${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex" >> "$DOCFILE"
fi
done
pdflatex -output-directory "$WORKING_DIR" "$DOCFILE"
pdflatex -output-directory "$WORKING_DIR" "$DOCFILE" # ja, ist Absicht
pushd "$WORKING_DIR"
pdflatex -output-directory "$WORKING_DIR" "DOCUMENTATION.gen.tex"
pdflatex -output-directory "$WORKING_DIR" "DOCUMENTATION.gen.tex" # ja, ist Absicht
if [ $? -ne 0 ]; then
err "Fehler beim kompilieren der Dokumentation."
return 1
fi
popd
cp "${WORKING_DIR}/$(basename -s .tex ${DOCFILE}).pdf" "$HOME/Deine-LIP-Dokumentation.pdf"
cp "${WORKING_DIR}/DOCUMENTATION.gen.pdf" "$HOME/Deine-LIP-Dokumentation.pdf"
RC=$?
pressenter "Dokummentation der von dir installierten Paktete wurde in deinem Benutzerverzeichnis ($HOME) als 'Deine-LIP-Dokumentation.pdf' abegelegt."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment