summaryrefslogtreecommitdiff
path: root/scripts/dotty
blob: 45bbd8d1df32be93e44d6247181388abccb053d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e

##
# CLOSE THIS FILE! DO NOT LOOK BELOW!
#


# ./scripts/deplist system | ./scripts/dotty

printf "digraph G {\n";
while read k; do
    a=$(printf "%s " "${k}" | cut -d' ' -f1);
    printf "    \"%s\n" "${a}";
    for b in $(seq 2 $(_() { printf "%s" "${#}"; }; _ ${k})); do
        printf "    \"%s\" -> \"" "${a}";
        printf "%s " "${k}" | cut -d' ' -f${b};
    done
done | sed -e 's/$/";/g'
printf "}\n";