From: Stephen Rothwell Date: Sun, 27 May 2012 08:44:08 +0000 (+1000) Subject: fetch_trees: only fetch trees on the command line if specified X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=69ad6e13b3730e4e127ba17ea3c486989d751e44;p=next-scripts fetch_trees: only fetch trees on the command line if specified --- diff --git a/fetch_trees b/fetch_trees index a69e96c..d22c662 100755 --- a/fetch_trees +++ b/fetch_trees @@ -8,7 +8,9 @@ get_field() awk -F ' ' '$3 == "'$1'" { print $'$2'; }' } -trees=$(grep -v '^#' ../real_control | awk -F ' ' '{ print $3 }') +trees="$@" +[ "$trees" ] || + trees=$(grep -v '^#' ../real_control | awk -F ' ' '{ print $3 }') for name in $trees; do type=$(get_field "$name" 2)