merge_config.sh: Display usage if given too few arguments
authorOlof Johansson <olof@lixom.net>
Thu, 11 Dec 2014 20:55:03 +0000 (12:55 -0800)
committerMichal Marek <mmarek@suse.cz>
Wed, 7 Jan 2015 20:28:12 +0000 (21:28 +0100)
Two or more arguments are always expected. Show usage and exit if
given less.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/kconfig/merge_config.sh

index 81b0c61..2ab91b9 100755 (executable)
@@ -77,6 +77,11 @@ while true; do
        esac
 done
 
+if [ "$#" -lt 2 ] ; then
+       usage
+       exit
+fi
+
 INITFILE=$1
 shift;