Jim Myhrberg e49c930771 Make arguments simpler to deal with in action functions
<source> was an optional argument, and the second out of three passed,
meaning when only two arguments were given, the action functions would
have to know to use the second argument as <target>, instead of the the
third. Now the second argument is always <target>, and the <source>
argument is always the third, if given.
2014-03-08 13:32:24 +00:00
2013-10-20 22:51:08 +01:00
2013-10-21 09:35:34 +01:00
2013-10-20 22:51:08 +01:00

Dotify

Setup your dotfiles like a sane person. With a Dotfile:

ackrc     -> .ackrc
gitconfig -> .gitconfig
tmux.conf -> .tmux.conf

if [ "$(uname)" == "Darwin" ]; then
  powconfig -> .powconfig
fi

Dotfiles are basically fancy bash shell scripts which are executed via Dotify.

Overview

Setup

Let's say you've got a git repo somewhere in which you keep your dotfiles. And lets say that repo looks something like this:

.
├── dotify
├── Dotfile
├── hosts
│   └── mordor
│       ├── Dotfile
│       └── gitconfig
├── irbrc
└── tmux.conf

The dotify file is Dotify's main executable, which is a small self-contained bash script. It doesn't need to be included in your dotfiles, but it doesn't hurt.

The Dotfile in the root looks like this:

irbrc     -> .irbrc
tmux.conf -> .tmux.conf

if [ -f "hosts/$(hostname)/Dotfile" ]; then
  include "hosts/$(hostname)"
fi

And hosts/mordor/Dotfile like this:

gitconfig -> .gitconfig

Running

Now let's say your machine's hostname is mordor, and you've cloned your dotfiles repo to ~/src/dotfiles. If you were to cd into your dotfiles and run ./dotify install, you'll end up with a home folder like this:

.
├── .dotfiles -> /home/jimeh/src/dotfiles
├── .gitconfig -> .dotfiles/hosts/mordor/gitconfig
├── .irbrc -> .dotfiles/irbrc
├── .tmux.conf -> .dotfiles/tmux.conf
└── src
Description
[Work in Progress] Setup your dotfiles like a sane person. With a Dotfile.
Readme 230 KiB
Languages
Shell 96.7%
Makefile 3.3%