All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] merge_config.sh: Display usage if given too few arguments
@ 2014-12-11 20:55 Olof Johansson
  2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
  2015-01-07 20:28 ` [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Michal Marek
  0 siblings, 2 replies; 7+ messages in thread
From: Olof Johansson @ 2014-12-11 20:55 UTC (permalink / raw)
  To: yann.morin.1998; +Cc: linux-kbuild, dvhart, linux-kernel, Olof Johansson

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-07 20:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11 20:55 [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Olof Johansson
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.