File: generate-images.sh

package info (click to toggle)
suricata 1%3A8.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240,704 kB
  • sloc: ansic: 357,736; python: 8,721; sh: 5,043; makefile: 2,411; perl: 570; php: 170
file content (25 lines) | stat: -rwxr-xr-x 607 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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