Setting up a local CVS repository
Posted by creining | Filed under Linux/BSD
I started using CVS as a local repository for this site in order to better manage it. Also, I wanted to start blogging and wrestled with blogger and my template for awhile but finally won. This site conforms to XHTML 1.1 Strict. Woot. Here’s how I set up the local respository:
First we need to create the initial directory structure.
$ cd $ mkdir www $ cd www $ mkdir cvs-rep
Next we will create the initial CVS repository.
$ cvs -d ~/www/cvs-rep init
Of course we will want to take advantage of the CVSROOT environment variable.
$ CVSROOT=~/www/cvs-rep;export CVSROOT
Next we want to create the website directory in ~/www.
wget -k -m http://www.packetfu.org
We will import all the files into the repository with a release name, start.
$ cd www.packetfu.org $ cvs import www.packetfu.org creining start
Then remove the www.packetfu.org directory and instruct CVS to checkout a copy.
$ rm -rf www.packetfu.org $ cvs checkout www.packetfu.org
Now we can edit and commit files into CVS.
$ cd www.packetfu.org $ vi index.html $ cvs commit index.html
When we are done we can delete the work area, www.packetfu.org, until we want
to check it out of CVS again.
$ cvs release -d www.packetfu.org
When publishing to the web we do not want to include the CVS directories, so
we use export.
$ cvs export -r HEAD www.packetfu.org
Comments are closed.