diff options
Diffstat (limited to 'vcs/cvsservice/buildcvs.sh')
-rw-r--r-- | vcs/cvsservice/buildcvs.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vcs/cvsservice/buildcvs.sh b/vcs/cvsservice/buildcvs.sh new file mode 100644 index 00000000..9c7c95c4 --- /dev/null +++ b/vcs/cvsservice/buildcvs.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +# 3 arguments : +# - relative path to the local directory (e.g. ".") +# - module name (e.g. "plop") +# - root repository (e.g. ":ext:me@host:/path/to/cvsroot") + +mkcvs() { + rm -rf $1/CVS + mkdir -p $1/CVS + + echo $2 > $1/CVS/Repository + echo $3 > $1/CVS/Root + + for i in $1/*; do + if [ -d $i -a $i != $1/CVS ]; then + echo "D/"`basename $i`"////" >> $1/CVS/Entries + mkcvs "$i" "$2/"`basename $i` $3 + elif [ -f $i ]; then + echo "/"`basename $i`"/1.1.1.1/"`date +"%a %b %d %T %Y//"` >> $1/CVS/Entries + fi + done +} + +mkcvs $1 $2 $3 |