3 ms·
Seems that the de facto approach is to backup-rm-symlink. My approach is to source from existing configs whenever possible. Specifically, instead of mv ~/.ba
by shazow 15y ago
Seems that the de facto approach is to backup-rm-symlink. My approach is to source from existing configs whenever possible. Specifically, instead of
mv ~/.bashrc ~/.bashrc.bak; ln -s $DOTFILES_PATH/.bashrc ~/.bashrc
I do a slightly more sophisticated version of:
echo "source $DOTFILES_PATH/.bashrc" >> ~/.bashrc
(The sophistication comes in checking if that line already exists.)
Here's my install script: https://github.com/shazow/dotfiles/blob/master/install.sh https://github.com/shazow/dotfiles/blob/master/install.sh
I've found many benefits in this, such as easily having machine-specific configuration side by side with my unified dotfiles and no backup clutter. This works especially well for things like vim configs, too.
$ cat ~/.vimrc
source $DOTFILES_PATH/.vimrc
- blackman 15y agointeresting, as an alternative to this how about how janus does it with a .local file? https://github.com/carlhuda/janus/blob/master/vimrc#L147 https://github.com/carlhuda/janus/blob/master/vimrc#L147