summaryrefslogtreecommitdiff
path: root/ikiwiki-makerepo
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-02 15:36:16 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-02 15:36:16 -0400
commitbb2697ca5e39bc40a18aa01582087cc5c558442e (patch)
treeddddbddf8aa8b0c226aaf6c04f7c00ced72b2aff /ikiwiki-makerepo
parent4026650c8751f29890692f10833dae2b200cfc78 (diff)
parent85844b8494dd5e032d06afd623c25b4bb4a72578 (diff)
Merge commit 'schmonz/master' into cvs
Diffstat (limited to 'ikiwiki-makerepo')
-rwxr-xr-xikiwiki-makerepo26
1 files changed, 25 insertions, 1 deletions
diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo
index 7f82e7177..aca8da153 100755
--- a/ikiwiki-makerepo
+++ b/ikiwiki-makerepo
@@ -6,7 +6,7 @@ srcdir="$2"
repository="$3"
usage () {
- echo "usage: ikiwiki-makerepo svn|git|monotone|darcs srcdir repository" >&2
+ echo "usage: ikiwiki-makerepo cvs|svn|git|monotone|darcs srcdir repository" >&2
echo " ikiwiki-makerepo bzr|mercurial srcdir" >&2
exit 1
}
@@ -39,6 +39,30 @@ fi
echo "Importing $srcdir into $rcs"
case "$rcs" in
+cvs)
+ if [ -e "$srcdir/CVS" ]; then
+ echo "$srcdir already seems to be a cvs working copy" >&2
+ exit 1
+ fi
+ cvs -Q -d "$repository" init
+ cd "$srcdir"/..
+ cvs -Q -d "$repository" get -P CVSROOT
+ cd CVSROOT
+ echo .ikiwiki >> cvsignore
+ cvs -Q add cvsignore
+ echo "^ikiwiki $repository/CVSROOT/post-commit %{sVv} &" >> loginfo
+ cvs -Q commit -m "ikiwiki-makerepo setup" cvsignore loginfo
+ cd ..
+ rm -rf CVSROOT
+ cd "$srcdir"
+ cvs -Q -d "$repository" import -m "initial import" ikiwiki IKIWIKI PRE_CVS
+ cd ..
+ mv "$srcdir" "$srcdir.orig"
+ cvs -Q -d "$repository" get -P -d "$(basename "$srcdir")" ikiwiki
+ [ -d "$srcdir.orig/.ikiwiki" ] && mv "$srcdir.orig/.ikiwiki" "$srcdir"
+ rm -rf "$srcdir.orig"
+ echo "Directory $srcdir is now a checkout of $rcs repository $repository"
+;;
svn)
if [ -e "$srcdir/.svn" ]; then
echo "$srcdir already seems to be a svn working copy" >&2