diff options
author | Zach van Rijn <me@zv.io> | 2022-04-30 01:00:37 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-04-30 01:05:50 -0500 |
commit | 64b8c083f9685b15b9c9eb9af787f679daad012c (patch) | |
tree | d6b24e7bf0b388f487daaa33c02e201c2cf63205 /scripts/dotty | |
parent | d9fd5b1f036d17bcbdb7d38a02791561a1592f09 (diff) | |
download | packages-64b8c083f9685b15b9c9eb9af787f679daad012c.tar.gz packages-64b8c083f9685b15b9c9eb9af787f679daad012c.tar.bz2 packages-64b8c083f9685b15b9c9eb9af787f679daad012c.tar.xz packages-64b8c083f9685b15b9c9eb9af787f679daad012c.zip |
scripts/*: add dependency resolver.
Diffstat (limited to 'scripts/dotty')
-rwxr-xr-x | scripts/dotty | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/dotty b/scripts/dotty new file mode 100755 index 000000000..45bbd8d1d --- /dev/null +++ b/scripts/dotty @@ -0,0 +1,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"; |