]> sipb.mit.edu Git - ikiwiki.git/blobdiff - ikiwiki-makerepo
anonok is safe
[ikiwiki.git] / ikiwiki-makerepo
index 6ae3e28a3a7ee8a9cdc8bd769439c7e8433406cb..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
@@ -58,6 +62,7 @@ git)
        cd "$srcdir"
        git init
        echo /.ikiwiki > .gitignore
+       echo /recentchanges >> .gitignore
        git add .
        git commit -m "initial commit"
        git remote add origin "$repository"