#!/bin/sh

set -e

REPO=$1
[ -n "$REPO" ] || exit 1

DIR=`basename $REPO`

mkdir $DIR
cd $DIR
### darcs ###
darcs initialize
echo "$REPO" > _darcs/prefs/defaultrepo
patch _darcs/prefs/boring << -EOF-
9a10,12
> # wg. git
> \.git$
> 
-EOF-
### git ###
# git config --global user.name "FF-DO-Wiki `hostname`"
# git config --global user.email "$USER@`hostname`"
git init
echo "_darcs" > .gitignore
git add .gitignore
git commit -m "ignore _darcs" .gitignore
