projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 2008 Lieferdatum in Gutschrift
[kivitendo-erp.git]
/
scripts
/
build_doc.sh
diff --git
a/scripts/build_doc.sh
b/scripts/build_doc.sh
index
0db7bf3
..
d7892c3
100755
(executable)
--- a/
scripts/build_doc.sh
+++ b/
scripts/build_doc.sh
@@
-1,7
+1,7
@@
#!/bin/bash
# Usage:
#!/bin/bash
# Usage:
-# cd /path/to/
lx-office
+# cd /path/to/
kivitendo
# ./scripts/build_doc.sh
set -e
# ./scripts/build_doc.sh
set -e
@@
-11,6
+11,28
@@
if [[ ! -d doc ]]; then
exit 1
fi
exit 1
fi
+doc=${PWD}/doc
+
+html=1
+pdf=1
+
+if [[ ! -z $1 ]] ; then
+ html=0
+ pdf=0
+ while [[ ! -z $1 ]] ; do
+ case $1 in
+ html) html=1 ;;
+ pdf) pdf=1 ;;
+ *)
+ echo "Unknown parameter $1"
+ exit 1
+ ;;
+ esac
+
+ shift
+ done
+fi
+
dobudish=$(ls -d doc/build/dobudish* 2> /dev/null)
if [[ -z $dobudish ]] || [[ ! -d ${dobudish} ]]; then
dobudish=$(ls -d doc/build/dobudish* 2> /dev/null)
if [[ -z $dobudish ]] || [[ ! -d ${dobudish} ]]; then
@@
-29,12
+51,21
@@
input=${base}/input
output=${base}/output
custom=${base}/custom-cfg
output=${base}/output
custom=${base}/custom-cfg
-rm -
f ${input}/*.xml
-cp ../../dokumentation.xml ${input}/
+rm -
rf ${input} ${custom}
+mkdir ${input} ${input}/copy_to_output ${custom}
-rm -f ${custom}/*
-cp -R ../custom-cfg/* ${custom}/
+cp ${doc}/dokumentation.xml ${input}/
+test -d ${doc}/images && cp -R ${doc}/images ${input}/copy_to_output/
+cp -R ${doc}/build/custom-cfg/* ${custom}/
-./generator.sh dokumentation pdf
+if [[ $pdf = 1 ]] ; then
+ ./generator.sh dokumentation pdf
+ cp ${output}/pdf/dokumentation.pdf ${doc}/kivitendo-Dokumentation.pdf
+fi
-cp ${output}/pdf/dokumentation.pdf ../../
+if [[ $html = 1 ]]; then
+ ./generator.sh dokumentation html
+ rm -rf ${doc}/html
+ mkdir ${doc}/html
+ cp -R ${output}/html ${doc}/
+fi