tomhoover/dotfiles — Issue #2: host-specific linking logic doesn't work, if the corresponding default dotfile doesn't exist
Author: tomhoover
Created: 2012-01-19 00:13:18+00:00
State: open

The host-specific linking logic works correctly, if both the default and host-specific dotfiles exist within the same directory. For example, if the ~/.dotfiles directory contains the following files:

* bashrc
* bashrc:ariel

and the hostname of my computer is ariel, the following link is created when executing dotfiles install:

* .bashrc -> .dotfiles/bashrc:ariel

If the hostname of my computer is bethel, the following link is created instead:

* .bashrc -> .dotfiles/bashrc

The linking logic also works correctly if bashrc and bashrc:ariel are both located within ~/.dotfiles-private (or any other ~/.dotfiles* directory).

-----

**BUG Description:**

The host-specific linking logic fails, however, if only a host-specific dotfile exists (without the corresponding "default" dotfile).

For example, if ~/.dotfiles contains the following file:

* bashrc:ariel

but does not include the corresponding "default" dotfile:

* bashrc

the following link will never be created:

* .bashrc -> .dotfiles/bashrc:ariel