X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Fbuild_doc.sh;h=ce96ffe43d7cedddf79ac6d2d81aeba0dad58386;hb=f8309cb7bc2507c19e17ec59c6c66dd7f49ea351;hp=0db7bf330fc10b016e113dcb1198089fd30bfcec;hpb=27f054b7e2b2a0847a3812a24324fcc48779641f;p=kivitendo-erp.git diff --git a/scripts/build_doc.sh b/scripts/build_doc.sh index 0db7bf330..ce96ffe43 100755 --- a/scripts/build_doc.sh +++ b/scripts/build_doc.sh @@ -11,6 +11,26 @@ if [[ ! -d doc ]]; then exit 1 fi +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 @@ -29,12 +49,21 @@ input=${base}/input 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 ../../dokumentation.xml ${input}/ +cp -R ../../images ${input}/copy_to_output/ cp -R ../custom-cfg/* ${custom}/ -./generator.sh dokumentation pdf +if [[ $pdf = 1 ]] ; then + ./generator.sh dokumentation pdf + cp ${output}/pdf/dokumentation.pdf ../../ +fi -cp ${output}/pdf/dokumentation.pdf ../../ +if [[ $html = 1 ]]; then + ./generator.sh dokumentation html + rm -rf ../../html + mkdir ../../html + cp -R ${output}/html ../../ +fi