summaryrefslogtreecommitdiff
path: root/ikiwiki-makerepo
diff options
context:
space:
mode:
authorJoey Hess <joey@penguin.kitenet.net>2008-08-03 14:21:43 -0400
committerJoey Hess <joey@penguin.kitenet.net>2008-08-03 14:21:43 -0400
commitd9db5f2def7a1dd2c8e76195df1ea1a988b6b79e (patch)
tree21305c2581283649bbf496e737bad5b9880160f8 /ikiwiki-makerepo
parenteadff687abbec442423967d5cba3bcfb606dc1a9 (diff)
Bail if both srcdir and repository are not specified.
Diffstat (limited to 'ikiwiki-makerepo')
-rwxr-xr-xikiwiki-makerepo6
1 files changed, 5 insertions, 1 deletions
diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo
index d249e5e75..b733bd13a 100755
--- a/ikiwiki-makerepo
+++ b/ikiwiki-makerepo
@@ -4,7 +4,7 @@ set -e
rcs="$1"
srcdir="$2"
repository="$3"
-
+
usage () {
echo "usage: ikiwiki-makerepo svn|git srcdir repository" >&2
echo " ikiwiki-makerepo bzr|mercurial srcdir" >&2
@@ -21,6 +21,10 @@ if [ ! -d "$srcdir" ]; then
fi
if [ "$rcs" != mercurial ] && [ "$rcs" != bzr ]; then
+ if [ -z "$repository" ]; then
+ echo "you need to specify both a srcdir and a repository for $rcs" >&2
+ usage
+ fi
if [ -e "$repository" ]; then
echo "repository $repository already exists, aborting" >&2
exit 1