X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Fbuild_doc.sh;h=6362075a3cef7589d6cccaf22ebbf8c1f431b576;hb=a5d61345a0d75cdf33ea43096969215f4efe18f1;hp=d7892c38e5116e486a04200773e2e2b2c51606ed;hpb=5fa26f9a276487b08665bcefe36986bb66b9a3d7;p=kivitendo-erp.git diff --git a/scripts/build_doc.sh b/scripts/build_doc.sh index d7892c38e..6362075a3 100755 --- a/scripts/build_doc.sh +++ b/scripts/build_doc.sh @@ -15,14 +15,17 @@ doc=${PWD}/doc html=1 pdf=1 +images=1 if [[ ! -z $1 ]] ; then html=0 pdf=0 + images=0 while [[ ! -z $1 ]] ; do case $1 in - html) html=1 ;; - pdf) pdf=1 ;; + html) html=1 ;; + pdf) pdf=1 ;; + images) images=1 ;; *) echo "Unknown parameter $1" exit 1 @@ -69,3 +72,15 @@ if [[ $html = 1 ]]; then mkdir ${doc}/html cp -R ${output}/html ${doc}/ fi + +if [[ $images = 1 ]]; then + # copy system images from Dobudish directory + image_list=$(mktemp) + perl -nle 'print $1 while m{ (?: \.\./ )+ ( system/ [^\"]+ ) }xg' ${doc}/html/*.html | sort | uniq > $image_list + if [[ -s $image_list ]]; then + tar -c -f - -T $image_list | tar -x -f - -C ${doc}/html + perl -pi -e 's{ (\.\./)+ system }{system}xg' ${doc}/html/*.html + fi + + rm $image_list +fi