paket-grafik

This commit is contained in:
milisbir 2018-01-23 07:23:43 +02:00
parent 29e8661179
commit e462a7b2f6
1 changed files with 12 additions and 0 deletions

12
bin/paket_grafik.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
[ "`which dot`" = "" ] && exit 1
[ $1 ] && paket=$1 || exit 1
[ -f $paket.grafik ] && rm $paket.grafik
[ -f $paket.png ] && rm $paket.png
echo "digraph {" > $paket.grafik
mps -dly $paket
for gerek in `cat tumgerekler.liste`;do
echo "<${gerek}> -> <${paket}>;" >> $paket.grafik
done
echo "}" >> $paket.grafik
cat $paket.grafik | dot -T png > $paket.png