]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: add usage information to checkconfig.sh
authorSami Kerola <kerolasa@iki.fi>
Sun, 16 Feb 2014 23:54:16 +0000 (23:54 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Feb 2014 13:04:35 +0000 (14:04 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools/checkconfig.sh

index 91f7b1c05c2803937f2fe1ed2373c0ab507632ad..5f2063ad491f3c83554b96c4813e3c1fededeb5e 100755 (executable)
@@ -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"