summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:39:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:39:49 +0000
commita0aa2307322cd47bbf416810ac0292925e03be87 (patch)
tree37076262a026c4b48c8a0e84f44ff9187556ca35 /scripts
parentInitial commit. (diff)
downloadsuricata-a0aa2307322cd47bbf416810ac0292925e03be87.tar.xz
suricata-a0aa2307322cd47bbf416810ac0292925e03be87.zip
Adding upstream version 1:7.0.3.upstream/1%7.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-images.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/generate-images.sh b/scripts/generate-images.sh
new file mode 100755
index 0000000..b50b75e
--- /dev/null
+++ b/scripts/generate-images.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#
+# Script to generate Sequence Diagram images with mscgen
+#
+
+parent_path=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)
+
+set -e
+
+cd "$parent_path"
+cd ../doc/userguide/devguide/extending/app-layer/diagrams
+
+for FILE in *.msc ; do
+ # call mscgen and convert each file in images dir
+ echo "Generating image for $FILE"
+ mscgen -T png -F Arial $FILE
+ # if command fails, lets inform about that
+ if [ $? -ne 0 ]; then
+ echo "$FILE couldn't be converted in the devguide"
+ # let's exit to make it more evident something is amiss
+ exit 1
+ fi
+done
+
+exit 0