[PATCH 3/9] tools: add usage information to checkconfig.sh

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

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 tools/checkconfig.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/checkconfig.sh b/tools/checkconfig.sh
index 91f7b1c..5f2063a 100755
--- a/tools/checkconfig.sh
+++ b/tools/checkconfig.sh
@@ -16,6 +16,17 @@ die() {
 	exit 1
 }
 
+usage() {
+	echo "Usage:"
+	echo " $0 <top_srcdir> <srcfile> [<srcfile> ...]"
+	echo "Example:"
+	echo " find . -name '*.c' | xargs $0 \$(git rev-parse --show-toplevel)"
+}
+
+if [ $# -eq 0 ]; then
+	usage
+	exit 1
+fi
 srcdir=$1
 config="$srcdir/config.h.in"
 
-- 
1.9.0

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