From 09f12b11759e620dd82693a9c3de9f60f0fc3c9e Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Thu, 13 Mar 2014 11:31:30 +0200 Subject: [PATCH] now with symlink support --- anduril/anduril-component-doc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/anduril/anduril-component-doc b/anduril/anduril-component-doc index 0e7191a..b04b76a 100755 --- a/anduril/anduril-component-doc +++ b/anduril/anduril-component-doc @@ -16,11 +16,12 @@ usage () { echo " add_autobundles () { for b in $( find -L "$ANDURIL_HOME" -maxdepth 2 -name bundle.xml ); - do if grep autoload.*true "$b" > /dev/null + do if grep -i autoload.*true "$b" > /dev/null then bundles+=( $( dirname "$b" ) ) fi + done - + } bundlefunc () { @@ -35,7 +36,7 @@ listcomps () { for ((i=0; i<${#bundles[@]}; i++ )) do bname=$( cat ${bundles[$i]}/bundle.xml | tr -d -c [:print:] | tr " " _ | sed 's,.*\(.*\).*,\1,' ) [[ -a ${bundles[$i]}/bundle.xml ]] || echo Bundle ${bundles[$i]} not found || exit 1 - compList+=( $( find ${bundles[$i]} -maxdepth 3 -mindepth 3 -name component.xml -printf '%P\n' | sed -e 's,/component.xml,,' -e s,.*/,"\($bname\):", | sort ) ) + compList+=( $( find -L ${bundles[$i]} -maxdepth 3 -mindepth 3 -name component.xml -printf '%P\n' | sed -e 's,/component.xml,,' -e s,.*/,"\($bname\):", | sort ) ) done } printcomps () { @@ -45,13 +46,16 @@ printcomps () { } listdoc () { - -if [ -z "$SHORTLIST" ] -then anduril run-component $1 $BUNDLESTRING --doc $LONGLIST -else - anduril run-component $1 $BUNDLESTRING --doc $LONGLIST | grep "^[*=]" -fi +local e_code +if [ -z "$SHORTLIST" ] +then anduril run-component $1 $BUNDLESTRING --doc --log /tmp/anduril_doc_log $LONGLIST +else + anduril run-component $1 $BUNDLESTRING --doc --log /tmp/anduril_doc_log $LONGLIST | grep "^[*=]" +fi +e_code=$? +rm -rf /tmp/anduril_doc_log +return $e_code } bundles=( )