linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: yann.morin.1998@free.fr
Cc: linux-kbuild@vger.kernel.org, dvhart@linux.intel.com,
	linux-kernel@vger.kernel.org, Olof Johansson <olof@lixom.net>
Subject: [PATCH 1/2] merge_config.sh: Display usage if given too few arguments
Date: Thu, 11 Dec 2014 12:55:03 -0800	[thread overview]
Message-ID: <1418331304-4821-1-git-send-email-olof@lixom.net> (raw)

Two or more arguments are always expected. Show usage and exit if
given less.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 scripts/kconfig/merge_config.sh |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 81b0c61..2ab91b9 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -77,6 +77,11 @@ while true; do
 	esac
 done
 
+if [ "$#" -lt 2 ] ; then
+	usage
+	exit
+fi
+
 INITFILE=$1
 shift;
 
-- 
1.7.10.4


             reply	other threads:[~2014-12-11 20:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 20:55 Olof Johansson [this message]
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
2014-12-24  4:51   ` Masahiro Yamada
2014-12-26 22:40   ` Darren Hart
2015-01-07 20:29   ` Michal Marek
2015-01-07 20:28 ` [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418331304-4821-1-git-send-email-olof@lixom.net \
    --to=olof@lixom.net \
    --cc=dvhart@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).