loom
1#!/bin/bash
2
3# Формирование изображений диаграм АСД для основных операций SBL
4
5dir=doc/tree
6png=ode
7
8if [ -d $dir/$png ]
9then
10echo $dir/$png exists, cleaning...
11#rm -rf $dir/$png/*.png
12else
13mkdir $dir
14mkdir $dir/$png
15fi
16
17echo Prepare grammar...
18bin/simodo-grammatize -z slr -u data/grammar/s-script.fuze
19bin/simodo-grammatize -z slr -u data/grammar/s-ode.fuze
20
21for file in test/source/engine/ode/models/*.s-*
22do
23echo ${file}
24filename=$(basename -- "$file")
25extension="${file##*.}"
26# basename="${file%.*}"
27# fbname=$(basename "$file" | cut -d. -f1)
28bin/simodo-parse -l -g data/grammar/${extension}.fuze -S ${file} -s test/tmp/${filename}.dot
29if [ -e test/tmp/${filename}.dot ]
30then
31dot -Tpng test/tmp/${filename}.dot -o${dir}/${png}/${filename}.png
32fi
33done
34
35rm -rf test/tmp/*.dot
36