diff mbox

[1/2] merge_config.sh: Display usage if given too few arguments

Message ID 1418331304-4821-1-git-send-email-olof@lixom.net (mailing list archive)
State New, archived
Headers show

Commit Message

Olof Johansson Dec. 11, 2014, 8:55 p.m. UTC
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(+)

Comments

Michal Marek Jan. 7, 2015, 8:28 p.m. UTC | #1
On Thu, Dec 11, 2014 at 12:55:03PM -0800, Olof Johansson wrote:
> Two or more arguments are always expected. Show usage and exit if
> given less.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Applied to kbuild.git#kconfig, thanks.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;