]> git.ozlabs.org Git - next-scripts/commitdiff
fetch_trees: only fetch trees on the command line if specified
authorStephen Rothwell <sfr@canb.auug.org.au>
Sun, 27 May 2012 08:44:08 +0000 (18:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 27 May 2012 08:44:08 +0000 (18:44 +1000)
fetch_trees

index a69e96c19a2b8ab6ef9af6f6d794d59f505df1c7..d22c6629263862ea88f5eb074c1fbf2f2d221c78 100755 (executable)
@@ -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)