public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 3/4] tools: make config-gen to require build target argument
Date: Sun, 16 Feb 2014 15:22:55 +0000	[thread overview]
Message-ID: <1392564176-11596-4-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1392564176-11596-1-git-send-email-kerolasa@iki.fi>

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 | 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


  parent reply	other threads:[~2014-02-16 15:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 15:22 [PATCH 0/4] pull: allow disabling command builds Sami Kerola
2014-02-16 15:22 ` [PATCH 1/4] build-sys: allow per directory build targets Sami Kerola
2014-02-16 15:22 ` [PATCH 2/4] build-sys: add libs-only to config-gen.d Sami Kerola
2014-02-16 15:22 ` Sami Kerola [this message]
2014-03-07 10:54   ` [PATCH 3/4] tools: make config-gen to require build target argument Karel Zak
2014-02-16 15:22 ` [PATCH 4/4] tests: check commands needed for running a test exist Sami Kerola
2014-03-07 10:55   ` Karel Zak
2014-03-07 10:44 ` [PATCH 0/4] pull: allow disabling command builds Karel Zak
2014-03-07 14:52   ` Sami Kerola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392564176-11596-4-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox