]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: make config-gen to require build target argument
authorSami Kerola <kerolasa@iki.fi>
Sun, 16 Feb 2014 15:22:55 +0000 (15:22 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Mar 2014 10:45:54 +0000 (11:45 +0100)
When argument is not supplied help user by telling what arguments can be
used.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools/config-gen

index b7ccadd0a096d6c9495135cac9343f7b60533dc8..5febdc46605222a8589120c786e8969e4bdec32f 100755 (executable)
@@ -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