#!/bin/bash
+[ "$1" = "-s" ] && {
+ shift
+ start_from="$1"
+ [ -z "$start_from" ] && {
+ echo "-s requires a start tree" 1>&2
+ exit 1
+ }
+ shift
+}
+
. "$(dirname $0)/common.sh" ""
get_field()
trees=$(grep -v '^#' $CTRL_FILE | awk -F '\t' '{ print $3 }')
for name in $trees; do
+ [ -n "$start_from" ] && {
+ if [ "$name" = "$start_from" ]; then
+ start_from=""
+ else
+ continue
+ fi
+ }
+
type=$(get_field "$name" 2)
echo $name: $type