]> code.ossystems Code Review - meta-freescale.git/commitdiff
scripts/get-maintainer: support multiple machine directories on the command line
authorMario Domenech Goulart <mario@ossystems.com.br>
Fri, 25 Apr 2014 13:38:56 +0000 (10:38 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 25 Apr 2014 14:30:12 +0000 (11:30 -0300)
Now the optional machine specification must be indicated by the
--machine parameter, not to generate ambiguities with directories.

Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/scripts/get-maintainer

index d5a790741b5c878149572dab289200ea54c0c1ba..1c5be02f2dc369b9cc12c632e050481b89d437a8 100755 (executable)
@@ -21,21 +21,31 @@ usage() {
        cat<<EOF
 Usage:
 
- $0 <path> [machine]
+ $0 [ --machine=<machine> ] <path> ...
 
- Options:
+   <path>
+       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=<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