Install the XCode
bash -c "$(curl -fsSL https://raw.github.com/weisjohn/dotfiles/master/bin/dotfiles)"
The command to get everything started is ~/bin/dotfiles, and this is my "dotfiles" Git repo.
It's really not very complicated. When dotfiles is run, it does a few things:
- Git is installed if necessary, via APT or Homebrew (which is installed if necessary).
- This repo is cloned into the
~/mysrc/dotfilesdirectory (or updated if it already exists). - Files in
initare executed (in alphanumeric order). - Files in
copyare copied into~/. - Files in
linkare linked into~/.
Note:
- The
backupsfolder only gets created when necessary. Any files in~/that would have been overwritten bycopyorlinkget backed up there. - Files in
binare executable shell scripts (~/mysrc/dotfiles/bin is added into the path). - Files in
sourceget sourced whenever a new shell is opened (in alphanumeric order).. - Files in
confjust sit there. If a config file doesn't need to go in~/, put it in there. - Files in
cachesare cached files, only used by some scripts. This folder will only be created if necessary.
Notes:
- You need to be an administrator (for
sudo). - You need to have installed XCode Command Line Tools, which are available as a separate, optional (and much smaller) download from XCode.
bash -c "$(curl -fsSL https://raw.github.com/weisjohn/dotfiles/master/bin/dotfiles)" && source ~/.bashrcYou can clone the repository wherever you want. (I like to keep it in ~/Projects/dotfiles, with ~/dotfiles as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder.
git clone https://github.com/weisjohn/dotfiles.git && cd dotfiles && ./bootstrap.shTo update, cd into your local dotfiles repository and then:
./bootstrap.shAlternatively, to update while avoiding the confirmation prompt:
./bootstrap.sh -fTo install these dotfiles without Git:
cd; curl -#L https://github.com/weisjohn/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh}To update later on, just run that command again.
If ~/.extra exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.
My ~/.extra looks something like this:
# PATH additions
export PATH="~/bin:$PATH"When setting up a new Mac, you may want to set some sensible OS X defaults:
./.osxSuggestions/improvements welcome!
- Gianni Chiappetta for sharing his amazing collection of dotfiles
- Matijs Brinkhuis and his homedir repository
- Jan Moesen and his ancient
.bash_profile+ shiny tilde repository - Ben Alman and his dotfiles repository
- Nicolas Gallagher and his dotfiles repository
- Tom Ryder and his dotfiles repository
- Tim Esselens
- anyone who contributed a patch or made a helpful suggestion