]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki-makerepo
ui improvements
[git.ikiwiki.info.git] / ikiwiki-makerepo
index d249e5e754c00a36ee29b6b6d667017c6b71bdda..b733bd13ab96d1801db4e31d0cc01f1f7e890f4a 100755 (executable)
@@ -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