|
I've gone through several schemes for making sure that I have a
similar shell environment wherever I work. The best I've found yet
(compared to efficient one-way syncing with rsync,
which I used previously) is to use a version control system to
maintain a central copy of my environment. I initially used CVS
for this purpose but have since moved to using Subversion.
The system is that I have a myenv directory in my home area on each machine, which is a checked out CVS repository. This contains subdirectories for my dotfiles, elisp, scripts, LaTeX packages and things like TODO lists, all of which are also under version control. This means I can make updates on any system and when I check it back in to my home PC the changes are merged. Yay!
I have a couple of scripts to ease this by building symbolic links: while I keep scripts and dotfiles in my "myenv" area, I prefer to have them accessed via a ~/local area, so one script is used to build the appropriate directories and symlinks. Another exists to symlink ~/.foo to the appropriate file in ~/local/etc/dotfoo or ~/myenv/dotfiles/dotfoo.
Finally, to make it feasible to use the same shell configuration in a lot of very different locations, I make use of a block in my .bashrc file, which loads a site (and possibly machine) specific configuration file in addition to global settings. A nice feature of this is that one .bashrc can specify different terminal prompt colour schemes for each machine, so I remember where I'm working!
All in all, it works very nicely. If you're having trouble juggling your configuration across many machines then I can recommend Subversion and symlinks as a nice method :-)