#!/bin/bash

set -e -x

rm -rf images
mkdir images

cargo install cargo-deps

cargo deps --all-deps --include-orphans --filter sn_client self_encryption qp2p sn_data_types sn_transfers xor_name | dot -T png -Nfontname=Iosevka -Gfontname=Iosevka -o images/sn_client-sn-dependencies.png
cargo deps | dot -T png -Nfontname=Iosevka -Gfontname=Iosevka -o images/sn_client-all-dependencies.png
