now with symlink support

This commit is contained in:
ville rantanen
2014-03-13 11:31:30 +02:00
parent 428fe44d16
commit 09f12b1175

View File

@@ -16,11 +16,12 @@ usage () { echo "
add_autobundles () { add_autobundles () {
for b in $( find -L "$ANDURIL_HOME" -maxdepth 2 -name bundle.xml ); 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" ) ) then bundles+=( $( dirname "$b" ) )
fi fi
done done
} }
bundlefunc () { bundlefunc () {
@@ -35,7 +36,7 @@ listcomps () {
for ((i=0; i<${#bundles[@]}; i++ )) do for ((i=0; i<${#bundles[@]}; i++ )) do
bname=$( cat ${bundles[$i]}/bundle.xml | tr -d -c [:print:] | tr " " _ | sed 's,.*<name>\(.*\)</name>.*,\1,' ) bname=$( cat ${bundles[$i]}/bundle.xml | tr -d -c [:print:] | tr " " _ | sed 's,.*<name>\(.*\)</name>.*,\1,' )
[[ -a ${bundles[$i]}/bundle.xml ]] || echo Bundle ${bundles[$i]} not found || exit 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 done
} }
printcomps () { printcomps () {
@@ -45,13 +46,16 @@ printcomps () {
} }
listdoc () { 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=( ) bundles=( )