[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sharing dotfiles between diverse accounts



David Z Maze <dmaze@debian.org> writes:

> I have about four completely different login accounts that I use
> regularly.  They may as well be in separate universes; one is on my
> laptop, for example, while another will let me log in on most of the
> machines on the main MIT campus (with a fairly non-standard filesystem
> setup).  Regardless, though, there are several very portable things
> I'd like to share, like my two-line .screenrc, or my Emacs
> customizations.
> 
> In my ideal world, I'd like some sort of update system where I can
> change a dotfile on one machine and everything magically changes
> elsewhere.  Using something like rsync or CVS might work for this; I'd
> prefer to not have to type changelog comments (this could be worked
> around) or deal with merge conflicts (probably unavoidable).  Also
> ideally, I wouldn't have to type a password, but I don't think there's
> a good long-term reliable solution here (by far the most reliable
> place to keep, say, a CVS repository is on MIT's Athena system, but I
> can't use ssh RSA authentication and the various Kerberos-based
> services don't quite seem commonplace enough).
> 
> This seems like a common enough problem that anybody sufficiently
> geeky (say, who has a Debian machine at home and some Unixy machine at
> work/school) would have run into it.  Are there any pre-canned, or at
> least not-too-groady home-baked solutions out there?

My current, fairly crappy, solution is this .Makefile in my ~/ dir:

OPTIONS=--archive --verbose --update --relative
FILES=--exclude '*~' --include '/.galeon/' --include '/.galeon/bookmarks.xml' --include '/.gnus' --include '/.emacs' --include '/.gnuemacs/' --include '/.gnuemacs/*' --include '/.xemacs/' --include '/.xemacs/*' --include '/bin/' --include '/bin/*' --include '/.newsrc*' --include '/.sig*' --include '/.bbdb' --exclude '*'
REMOTE=nachitos:.
LOCAL=.

get:
	rsync $(OPTIONS) $(FILES) $(REMOTE) $(LOCAL)
	rsync $(OPTIONS) $(REMOTE)/doc $(LOCAL)

put:
	rsync $(OPTIONS) $(FILES) $(LOCAL) $(REMOTE)
	rsync $(OPTIONS) $(FILES) $(LOCAL)/doc $(REMOTE)

sync: get put


so when I want to sync the machines, I run a shell script called "rs"
which does:

#!/bin/sh

cd $HOME
make -f ~/.Makefile $@


So that's my half-assed home-baked solution.  I'm not sure if the put
target works properly, and I don't know how it would scale to 4
machines.  I threw in the second rsync with the /doc dir because I
wanted to sync that entire tree, and was too lazy to mess with the
--include/exclude crap.

Oki's suggestion to try Coda sounds cool.  I'll have to try that.

-- 
Brian Nelson <nelson@bignachos.com>
BigNachos@jabber.org
http://bignachos.com



Reply to: