Weblog entry #102 for Steve

CVS reorganisation
Posted by Steve on Sat 13 May 2006 at 20:50
Tags: none.

I've spent the past hour reorganising my home directory. Specifically my "dotfiles" directory where I keep all my per-user configuration files. Now rather than having a single global "dotfile directory" I have two:

  • One public containing shell / vim / emacs setup.
  • One private mostly containing password files, and mail setup stuff.

Previously I had all my hidden files checked into a single CVS project called "dotfiles". The contents of that now look like this:

steve@skx2:~$ ls -C .dotfiles
CVS            _bash_functions  _emacs  _screenrc     _xbindkeysrc  fixup.sh
Makefile       _bash_profile    _icewm  _spambayesrc  crontabs      vim.d
_bash_aliases  _bashrc          _irssi  _vimrc        emacs.d

The "fixup.sh" script is responsible for creating symbolic links:

steve@skx2:~$ ls -l .emacs
lrwxrwxrwx  1 steve users 28 May 13 20:30 .emacs -> /home/steve/.dotfiles/_emacs

Now that I've split it out into public and private halves (the private half containing a pwsafe password file, my .muttrc + .procmailrc file(s), etc) I can checkout the public half onto random work machines - without disclosing anything private.

Using CVS for storing configuration files is a great thing to do, but removing history when updating things is painful.

I've also done the same thing to my ~bin directory.

 

Comments on this Entry

Posted by deadcat (71.137.xx.xx) on Sun 14 May 2006 at 05:41
[ Send Message | View Weblogs ]
nice collection of ~/bin, i cvs all my dotfiles and ~/bin as well.
i noticed some of your scripts in ~/bin can be aliased instead of creating an entire file like the rot13, heres what i have:
lqqqqk deadcat@hades qqq «Sat May 13 · 21:38:09pm · /dev/pts/2» qqqqqqqqq
mq[ (= ~ qqq type rot13
rot13 is aliased to `perl -ne 'tr /a-zA-Z/n-za-mN-ZA-M/; print''
lqqqqk deadcat@hades qqq «Sat May 13 · 21:38:11pm · /dev/pts/2» qqqqqqqqq
mq[ (= ~ qqq echo hello there | rot13
uryyb gurer

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Sun 14 May 2006 at 11:39
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Yeah aliases are what I use a lot of the time, but some things are nice to be scripts so they can be used as filters/scripts inside other code.

(Mostly emacs, or perl)

Steve

[ Parent | Reply to this comment ]

Posted by deadcat (71.137.xx.xx) on Sun 14 May 2006 at 19:49
[ Send Message | View Weblogs ]
ah.. good point. never thought/used that much i guess. (=
i usually make them functions or aliases if they are less than certain lines of codes. heheh

[ Parent | Reply to this comment ]

Posted by daemon (196.25.xx.xx) on Sun 14 May 2006 at 23:19
[ Send Message | View Weblogs ]
I've been using subversion for all my revision control for a while now, and its also pretty cool, and a definite step up from RCS.

However, there's something that I've always wanted to work out, but never managed -- if you have any FreeBSD experience, you'll probably have noticed that alot of the base-system config files have what looks to be an RCS style keyword tag, but instead of the usual $Id: $ etc, it's $FreeBSD: $. And I've enver worked out how they manage to get "FreeBSD" (or anything custom) as a keyword.

The reason I'd like to know how, is so that I could maybe try and leave the author/maintainer "$Id$", and add my own with maybe my username or the machine's hostname as the keyword...

Any ideas?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Mon 15 May 2006 at 14:15
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I did a quick google search for 'custom subversion keywords' and found this bug report which suggests that FreeBSD did some patching on their own and this isn't supported properly yet.

Still I'm not a subversion user and things might changed since January. Sorry I couldn't be more helpful.

Steve

[ Parent | Reply to this comment ]

Posted by yaarg (62.49.xx.xx) on Mon 15 May 2006 at 13:53
[ Send Message | View Weblogs ]
That's a similar scheme to what I've been using for a few months now. Only I use Darcs instead of CVS.

[ Parent | Reply to this comment ]

Posted by dkg (216.254.xx.xx) on Mon 15 May 2006 at 14:05
[ Send Message | View dkg's Scratchpad | View Weblogs ]
This kind of information about how you keep your data organized is great! i'm similarly inspired by Joey Hess' instructions on using subversion for the same task.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Mon 15 May 2006 at 14:11
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I'm glad you appreciate it. I almost posted a real story about it, but figured it would be a minority interest.

The only non-obvious thing I did was create a mapping for the CVS module. This means that I can have a CVS project called 'mybin' but cause it to be checked out into a directory called bin. (The same thing happens for dotfiles - which checks itself out into a directory called .dotfiles.)

To do this checkout the CVSROOT project and edit the file modules to add lines like this:

dotfiles  -d .dotfiles dotfiles
dotfiles-private  -d .dotfiles-private dotfiles-private
mybin  -d bin mybin

Steve

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search