loom
1#!/bin/bash
2
3# Формирование изображений диаграм АСД для основных операций SBL
4
5dir=doc/tree
6png=check
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/simodo-script.fuze
19
20for file in test/source/simodo-script/check/*.simodo-script
21do
22echo ${file}
23fbname=$(basename "$file" | cut -d. -f1)
24bin/simodo-parse -l -g data/grammar/simodo-script.fuze -S ${file} -s test/tmp/${fbname}.dot
25if [ -e test/tmp/${fbname}.dot ]
26then
27dot -Tpng test/tmp/${fbname}.dot -o${dir}/$png/${fbname}.png
28fi
29done
30
31rm -rf test/tmp/*.dot
32