Weblog entry #102 for Steve
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
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 ]
[ 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)
[ Parent | Reply to this comment ]
i usually make them functions or aliases if they are less than certain lines of codes. heheh
[ Parent | Reply to this comment ]
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 ]
[ 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.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View dkg's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
[ 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
[ Parent | Reply to this comment ]