Problem
How to customize and maintain your home directory config files on many servers.
Solution
- Create a repository for your configs on github. You can track your config files in a repository like mine: dotfiles on github. There are many existing repositories that that you can clone or simply reuse.
- On the server/cloud server install https://github.com/andsens/homeshick. This bash script will help us to maintain the config files.
- Download your dotfiles (config files) repository on the server
- Install it in your home directory
- Add the customization to .bashrc file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (1) Example can be found here | |
# https://github.com/rtomaszewski/dotfiles | |
# (2) | |
#alias homeshick="source $HOME/.homesick/repos/homeshick/bin/homeshick.sh" | |
git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick | |
source $HOME/.homesick/repos/homeshick/homeshick.sh | |
# (3) | |
homeshick clone rtomaszewski/dotfiles | |
# because we don't use 'home' directory in the dotfiles repository we use this workaround | |
homeshick generate local | |
homeshick cd local | |
cd home | |
find ../../../repos/dotfiles -maxdepth 1 ! -name .git -a ! -name dotfiles -exec ln -s {} . \; | |
# (4) | |
homeshick link | |
# (5) | |
cat $HOME/.mydotfiles >> $HOME/.bashrc |
References
https://github.com/rtomaszewski/dotfiles
https://github.com/andsens/homeshick
http://dotfiles.github.io/
No comments:
Post a Comment