summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-11-14 13:39:59 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2012-11-14 13:39:59 +0100
commitacf2192cc82b254a7529e651e5ae1f92d92dd8c6 (patch)
tree2d1a4d47c0b450c7cd48a8cf20e2eb954477168e
parenta06a9e4a3834beede463a83c23656d7cad9ad968 (diff)
downloadbcfg2-tools-acf2192cc82b254a7529e651e5ae1f92d92dd8c6.tar.gz
bcfg2-tools-acf2192cc82b254a7529e651e5ae1f92d92dd8c6.tar.bz2
bcfg2-tools-acf2192cc82b254a7529e651e5ae1f92d92dd8c6.zip
buildfile: check required argument count
-rwxr-xr-xbuildfile5
1 files changed, 5 insertions, 0 deletions
diff --git a/buildfile b/buildfile
index d19d4eb..aba1005 100755
--- a/buildfile
+++ b/buildfile
@@ -9,6 +9,11 @@ if [ "$1" = "-v" ]; then
shift
fi
+if [ -z "$1" -o -z "$2" ]; then
+ echo "Usage: $0 <filename> <hostname>"
+ exit 1
+fi
+
bcfg2-info -Q "$REPO" buildfile "$@" | \
if [ "$verbose" = "1" ]; then
awk '/<Path/,/<\/Path>/{print}'