report-targets 494 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/sh

echo "digraph {"
echo "  { node [fontname=Helvetica,fontsize=20];"

while read first second third rest; do
	FROM=; TO=
	case "$first" in
	"trace:building")
		case "$third" in
		"->")
			FROM="$second"; TO="$rest";;
		*)
			continue;;
		esac
		;;
	*)
		continue;;
	esac
	[ -n "$FROM" -a -n "$TO" ] || continue
	for to in $TO; do
		out="  \"$FROM\" -> \"$to\""
		case $to in
24
		*distro/*|*vm/*)
25 26 27 28 29 30 31 32 33
			echo "$out [weight=10];";;
		*)
			echo "$out";;
		esac
	done
done

echo "  }"
echo "}"