Update README
This commit is contained in:
		
							parent
							
								
									9e3468fa45
								
							
						
					
					
						commit
						f22075aa25
					
				
					 2 changed files with 58 additions and 14 deletions
				
			
		
							
								
								
									
										72
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										72
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
					@ -2,21 +2,65 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
My personal dotfiles and configurations.
 | 
					My personal dotfiles and configurations.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## The Contents
 | 
					## Contents
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- `common` - A set of configuration files common to every system.
 | 
					- `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.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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
 | 
					- `$x/` - Additional (optional) configurations that can also be added.
 | 
				
			||||||
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:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Command-line arguments (precedence given first-to-last)
 | 
					- `install` - A file-copying utility script.
 | 
				
			||||||
- System hostname
 | 
					
 | 
				
			||||||
- The `common` directory
 | 
					## 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 ... ]
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue