From cbbc9dfd41bc77f84f7420edd2896f63f4fc3846 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Fri, 25 Apr 2014 10:38:56 -0300 Subject: [PATCH] scripts/get-maintainer: support multiple machine directories on the command line Now the optional machine specification must be indicated by the --machine parameter, not to generate ambiguities with directories. Signed-off-by: Mario Domenech Goulart Signed-off-by: Otavio Salvador --- meta-fsl-arm/scripts/get-maintainer | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/meta-fsl-arm/scripts/get-maintainer b/meta-fsl-arm/scripts/get-maintainer index d5a79074..1c5be02f 100755 --- a/meta-fsl-arm/scripts/get-maintainer +++ b/meta-fsl-arm/scripts/get-maintainer @@ -21,21 +21,31 @@ usage() { cat< [machine] + $0 [ --machine= ] ... - Options: + + Directory(ies) where to look for machine definition files. - path: directory to look for machine definition files - machine: optinal param to restrict the printing for a specific machine name + Options: + --machine= + Optional param to restrict the printing for a specific machine name. EOF } -path=$1 -specific_machine=$2 +path= +specific_machine= + +for opt in ${*}; do + if [ "`echo $opt | cut -b-10`" = "--machine=" ]; then + specific_machine="`echo $opt | cut -b11-`" + else + path="$path $opt" + fi +done -if [ -z "$1" ]; then +if [ -z "$path" ]; then usage return 1 fi -- 2.40.1