summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-16 15:57:53 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-16 15:57:53 (GMT)
commit30d769598971e46332e5a9e55913f12c25be96ba (patch)
treeb3e6a0e556988e9a796ebc7ed9ffff42d577263e
parenta1df7cd597fb1087b678933c2bc3c5f95ed7a1ff (diff)
downloadbaserock-chroot-30d769598971e46332e5a9e55913f12c25be96ba.tar.gz
Give helpful error when `manage-baserock add` is not given a URL
-rwxr-xr-xmanage-baserock7
1 files changed, 6 insertions, 1 deletions
diff --git a/manage-baserock b/manage-baserock
index 8210812..f9d646a 100755
--- a/manage-baserock
+++ b/manage-baserock
@@ -60,7 +60,12 @@ case "${ACTION}" in
echo "Sorry, $SYSTEM already exists"
exit 1
fi
-
+
+ if test -z "$URL"; then
+ echo "Usage: $0 add <name> <url>"
+ exit 1
+ fi
+
TEMP_BASE=$(mktemp -d --tmpdir="${BASEROCK_BASE}")
cleanup () { rm -rf "${TEMP_BASE}"; }
trap cleanup 0