From: Mario Domenech Goulart Date: Fri, 25 Apr 2014 13:38:56 +0000 (-0300) Subject: scripts/get-maintainer: support multiple machine directories on the command line X-Git-Tag: 2.1~960 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=cbbc9dfd41bc77f84f7420edd2896f63f4fc3846;p=meta-freescale.git 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 --- 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