Update README

This commit is contained in:
Adam Gausmann 2018-12-17 00:37:44 -06:00
parent 9e3468fa45
commit f22075aa25
2 changed files with 58 additions and 14 deletions

View file

@ -2,21 +2,65 @@
My personal dotfiles and configurations.
## The Contents
## Contents
- `common` - A set of configuration files common to every system.
- `$hostname` - Configuration files specific to the system with the given hostname.
- `$x` - Additional (optional) configurations that can also be added.
- `common/` - A set of configuration files common to every system.
## The System
- `$hostname/` - Configuration files specific to the system with the given
hostname.
Each subdirectory of this repository is a collection of files to install
relative to the current user's home directory (assumed to be `$HOME`)
which are merged into the home directory by the `install.sh` script.
The script chooses specific subdirectories and merges them in the following
order, with precedence given to the more recently-listed subdirectory if two or
more contain a file at the same path:
- `$x/` - Additional (optional) configurations that can also be added.
- Command-line arguments (precedence given first-to-last)
- System hostname
- The `common` directory
- `install` - A file-copying utility script.
## Configuration
Each subdirectory in this repository is a collection of configuration files
relative to the user's home directory. For example, adding the file
`common/.config/x` will install it to `$HOME/.config/x` when the `install`
script chooses the `common` subdirectory.
Files are chosen from these subdirectories in order, with precedence given to
the subdirectory listed first if multiple have a file in the same location:
- Custom subdirectories passed by command line (from left to right).
- The subdirectory that is the same as the system's hostname.
- The `common` subdirectory.
Note that any files existing in the subdirectory will be created, but the
script cannot detect when files are removed and will not attempt to remove
anything from the home directory.
## Installation
Made easy by the `install` script.
### Requirements
- `rsync`, used as the smart file copy utility.
### Environment
- `HOME` - The home directory of the user running this script.
- `HOSTNAME` - The hostname of this system. If not present, defaults to the
value of `hostname`.
- `DOTFILES` - The repository root. If not present, the directory containing
the `install` script is used.
### Steps
```
# Fetch the repository (if you haven't already):
git clone git@gitlab.com:agausmann/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
# Make sure submodules are up to date (thinks like third-party Vim plugins):
git submodule update --init
# Run the script:
./install [ custom_targets ... ]
```

View file