[PATCH 3/4] tools: make config-gen to require build target argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When argument is not supplied help user by telling what arguments can be
used.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 tools/config-gen | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/config-gen b/tools/config-gen
index b7ccadd..5febdc4 100755
--- a/tools/config-gen
+++ b/tools/config-gen
@@ -12,6 +12,15 @@ test -f sys-utils/mount.c || {
 
 . tools/config-gen-functions.sh
 
+if [ $# -eq 0 ]; then
+	echo "This script requires at least one of the folloving arguments:"
+	cd tools/config-gen.d
+	for i in *.conf; do
+		echo "  ${i%%.conf}"
+	done
+	exit 1
+fi
+
 while [ -n "$1" ]; do
 	opts="$opts $(ul_get_configuration tools/config-gen.d/$1.conf)"
 	shift
-- 
1.8.5.5

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




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux