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/dotfiles
directory (or updated if it already exists). - Files in
init
are executed (in alphanumeric order). - Files in
copy
are copied into~/
. - Files in
link
are linked into~/
.
Note:
- The
backups
folder only gets created when necessary. Any files in~/
that would have been overwritten bycopy
orlink
get backed up there. - Files in
bin
are executable shell scripts (~/mysrc/dotfiles/bin is added into the path). - Files in
source
get sourced whenever a new shell is opened (in alphanumeric order).. - Files in
conf
just sit there. If a config file doesn't need to go in~/
, put it in there. - Files in
caches
are 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 ~/.bashrc
You 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.sh
To update, cd
into your local dotfiles
repository and then:
./bootstrap.sh
Alternatively, to update while avoiding the confirmation prompt:
./bootstrap.sh -f
To 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:
./.osx
Suggestions/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