Skip to content

Commit

Permalink
Add option to diff files; improve argument parsing
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
jonvmey authored Jul 15, 2020
1 parent 1c63e2c commit 37be536
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 94 deletions.
91 changes: 91 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ authors = ["Nathan Kessler <[email protected]>"]
edition = "2018"

[dependencies]
clap = "2.33"
difference = "2.0"
walkdir = "2"
regex = "1"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Storing dotfiles in git repositories allows them to be shared across multiple co
* Toggle chunks of files per feature flags.
* Copy binary files without templating.
* Preserve file permissions.
* Diff mode to compare expected output against existing files

## Planned Features
Feature requests are welcome!
Expand All @@ -28,6 +29,12 @@ dot-templater CONFIG SRC_DIR DEST_DIR

Copies files from `SRC_DIR` to `DEST_DIR` according to rules in `CONFIG`.

```
dot-templater --diff CONFIG SRC_DIR DEST_DIR
```

Compares files from `SRC_DIR` modified according to rules in `CONFIG` against the contents of `DEST_DIR`.

### Config Format
Any line beginning with `#` is ignored. Config file can contain key/value substitutions and feature flags.

Expand Down
Loading

0 comments on commit 37be536

Please sign in to comment.