#!/bin/sh
#v10.1.0
#CBSDMODULE="build"
#MYARG=""
#MYOPTARG=""
#MYDESC="List of bases"

printf '\n\t/*\n\t * Clusters\n\t */\n'
printf '\tsubgraph "cluster_bsdconfig" {\n'
printf '\t\tbgcolor = "%s";\n' "$bgcolor_bsdconfig"
printf '\t\tlabel = "bsdconfig(8)";\n'
printf '\t\ttooltip = "bsdconfig(8)";\n'

create_subgraph()
{
printf "\tsubgraph \"$1\" {\n"
printf "\tbgcolor = \"lightyellow\";\n"
printf "\tlabel = \"CBSD tools subroutines\";\n"

find /usr/local/cbsd/tools -type f -depth 1 -maxdepth 1 -exec basename {} \; |while read _p; do
	printf "\t\t\"${_p}\";\n"
done

printf "\t};"

}


create_subgraph "CBSD tools subroutines"

exit 0

#subgraph "cluster_cbsd_includes" {
#                bgcolor = "lightyellow";
#                label = "CBSD tools subroutines";
#                "jail2iso";
#                "geli";
#        };
