diff --git a/anduril/anduril-component-doc b/anduril/anduril-component-doc index 9cac8fa..1ae41eb 100755 --- a/anduril/anduril-component-doc +++ b/anduril/anduril-component-doc @@ -7,7 +7,11 @@ usage () { echo " -b [bundledir] Include bundles. Multiple -b's accepted. -l List all components in the given bundles. -L Display example usage of the component. - Give component name as argument to display documentation."; } + -s Display short documentation - only the names of ports and parameters. + Give component name as argument to display documentation. + + Autobundles are loaded if exist. + "; } bundlefunc () { for ((i=0; i<${#bundles[@]}; i++ )) do @@ -33,7 +37,8 @@ printcomps () { bundles=( ) LONGLIST="" -options='hb:lL' +SHORTLIST="" +options='hb:lLs' while getopts $options option do case $option in @@ -41,6 +46,7 @@ do l ) listcomps; printcomps | sort; exit;; L ) LONGLIST="-L";; h ) usage; exit;; + s ) SHORTLIST="yes";; : ) echo "Missing option argument for -$OPTARG" >&2; exit 1;; esac done @@ -58,4 +64,8 @@ then echo -e "\n\nFile $1.and already exists. Remove it first." exit fi -anduril run-component $1 $BUNDLESTRING --doc $LONGLIST +if [ -z "$SHORTLIST" ] +then anduril run-component $1 $BUNDLESTRING --doc $LONGLIST +else + anduril run-component $1 $BUNDLESTRING --doc $LONGLIST | grep "^[*=]" +fi