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

From: Olof Johansson
Date: Thu Dec 11 2014 - 15:52:59 EST


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

Signed-off-by: Olof Johansson <olof@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/