Patchwork [01/11] scripts/create-recipe: fix handling of --help

login
register
mail settings
Submitter Paul Eggleton
Date Nov. 13, 2013, 2:32 p.m.
Message ID <5ae76653682b90639496197bcc8a3eb04eccbc1b.1384353075.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/61625/
State New
Headers show

Comments

Paul Eggleton - Nov. 13, 2013, 2:32 p.m.
If --help is specified as the first argument, show the standard help
text instead of trying to process it as a URL.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/create-recipe | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/create-recipe b/scripts/create-recipe
index 5613e92..b192990 100755
--- a/scripts/create-recipe
+++ b/scripts/create-recipe
@@ -1794,7 +1794,7 @@  sub calculate_sums
 # Main program 
 #
 
-if ( @ARGV < 1 ) {
+if ( @ARGV < 1 || $ARGV[0] eq "--help" ) {
     print "Usage: $0 [-r] <url-of-source-tarballs>\n";
     exit(1);
 }