I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…
Dotfiles.github.com - A guide to dotfiles on GitHub
11–20 of 39 posts
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#12I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…
http://git.kitenet.net/?p=joey/home.git;a=blob_plain;f=bin/d...
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#13I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…
[1] https://github.com/justone/dotfiles [2] https://github.com/sorin-ionescu/oh-my-zsh
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#14While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles
If you want to see more, https://github.com/apinstein/dotfiles
I suppose another alternative might be having a private ".local" repo as a submodule, and having a rake task to concatenate and install the shared & local files. It is a tricky problem.
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#15While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles
I see you have a zshrc.local; that's the same approach I use. Unfortunately not everything supports "includes" but many, many things do. If you want to see more, https://github.com/apinstein/dotfiles I suppose another alternative might be having a private ".local" repo as a submodule, and having a rake task to concatenate and install the shared & local files. It is a tricky problem.
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#16While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles
edit: might as well link my repo, which doesn't yet include that functionality: https://github.com/drewfrank/dotfiles
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#17While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles
I haven't done it yet, but I've been meaning to set up a very simple solution to this using a preprocessor (probably m4). I think wrapping a few blocks in if-statements based on the host name will go pretty far. edit: might as well link my repo, which doesn't yet include that functionality: https://github.com/drewfrank/dotfiles
https://github.com/halostatue/dotfiles
I've been slowly moving toward a 'detect-and-configure' plug-in system that I'm quite happy with.
Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#18I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…
DOTFILES=$HOME/where/the/dotfiles/live/in/git
for T in $DOTFILES/*; do
TARGET=$(readlink -e $T)
LINK_NAME=$($HOME/.$(basename $TARGET))
# test if a file, working symlink, or broken symlink already exists
if [ -e $LINK_NAME -o -L $LING_NAME ]; then
CURRENT_TARGET=$(readlink -m $LINK_NAME)
if [ $CURRENT_TARGET != $TARGET ]; then
echo "$LINK_NAME already exists and is really $CURRENT_TARGET"
fi
fi
ln -s $TARGET $LINK_NAME
done
Remove stale dotfile symlinks: for L in $(find $HOME -maxdepth 1 -type l -name '.*'); do
if [ ! -e $L ]; then rm $L; fi
done
This assumes you'll use git excludes to keep files you don't want out of your repository. E.G. if you don't want $HOME/.ssh/id_rsa in git then you'd have $DOTFILES/ssh/.gitignore with 'id_rsa' in it. If you try to manage your excludes through the linking you'll end up with a very ugly script like what I have at https://github.com/sciurus/dotfile_managementRe: Dotfiles.github.com - A guide to dotfiles on GitHub
#19Re: Dotfiles.github.com - A guide to dotfiles on GitHub
#20While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles
Towards that end, (and for keeping certain sensitive things from repos...) I made this: https://github.com/sophacles/dotfuse It is a fuse filesystem that allows for modularization of some "single file" style dotfiles. Combined with git branche or modules (or both) it can get a lot of this (i hope). Warning though, it is still a bit of a toy, and I haven't played with it for a while, but I'm open to suggestions and pu…