2025-02-21 15:06:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -euv
|
|
|
|
|
|
|
|
cd @srcdir@
|
|
|
|
|
2025-02-25 12:33:21 +02:00
|
|
|
if test "@HAVE_PLANTUML@" = "no" ; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# uml-to-png
|
|
|
|
# shellcheck disable=SC2043
|
|
|
|
for uml in @umls@; do @PLANTUML@ -tpng "$uml"; done
|
|
|
|
# uml-to-svg
|
|
|
|
# shellcheck disable=SC2043
|
|
|
|
for uml in @umls@; do @PLANTUML@ -tsvg "$uml"; done
|
|
|
|
# format-svgs
|
|
|
|
if test "@HAVE_XMLLINT" != "no" ; then
|
2025-02-21 15:06:10 +02:00
|
|
|
# shellcheck disable=SC2043
|
2025-02-25 12:33:21 +02:00
|
|
|
for svg in @svgs@; do xmllint --format "$svg" > tmp; mv tmp "$svg"; done
|
|
|
|
else
|
|
|
|
printf 'WARNING: xmllint not found. SVGs not formatted.\n'
|
2025-02-21 15:06:10 +02:00
|
|
|
fi
|
2025-02-25 12:33:21 +02:00
|
|
|
# uml-to-txt
|
|
|
|
# shellcheck disable=SC2043
|
|
|
|
for uml in @tumls@; do @PLANTUML@ -ttxt "$uml"; done
|
|
|
|
# shellcheck disable=SC2043
|
|
|
|
for txt in @txts@; do sed 's/ *$//g' "$txt" > tmp; mv tmp "$txt"; done
|