generate-images.sh 607 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. #
  3. # Script to generate Sequence Diagram images with mscgen
  4. #
  5. parent_path=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)
  6. set -e
  7. cd "$parent_path"
  8. cd ../doc/userguide/devguide/extending/app-layer/diagrams
  9. for FILE in *.msc ; do
  10. # call mscgen and convert each file in images dir
  11. echo "Generating image for $FILE"
  12. mscgen -T png -F Arial $FILE
  13. # if command fails, lets inform about that
  14. if [ $? -ne 0 ]; then
  15. echo "$FILE couldn't be converted in the devguide"
  16. # let's exit to make it more evident something is amiss
  17. exit 1
  18. fi
  19. done
  20. exit 0