From ab97c3afae8ac62ab5851fa0f97997fb80e49a8f Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 15 Sep 2017 15:37:09 +0200 Subject: [PATCH] update README with include config --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9718bb1..53c56a8 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ git submodule add https://github.com/deadc0de6/dotdrop.git * [List the available profiles](#List-the-available-profiles) * [List configured dotfiles](#List-configured-dotfiles) * [Execute an action when deploying a dotfile](#Execute-an-action-when-deploying-a-dotfile) + * [Include all dotfiles from another profile](#Include-all-dotfiles-from-another-profile) * [Update dotbot](#Update-dotbot) * [Template](#template) @@ -201,8 +202,10 @@ the following entries: - ``` -* **profiles** entry: a list of profiles with a sublist +* **profiles** entry: a list of profiles with a list of dotfiles that need to be deployed for this profile + * `profiles`: the dotfiles associated to this profile + * `include`: include all dotfiles from another profile (optional) ``` : @@ -210,6 +213,10 @@ the following entries: - - - ... + # Optional + include: + - + - ... ``` * **actions** entry: a list of action available @@ -318,6 +325,25 @@ to update the submodule: git submodule update --recursive --remote ``` +## Include all dotfiles from another profile + +If one profile is using the entire set of another profile, one can use +the `include` entry for a clean config file. + +For example: +``` +profiles: + host1: + dotfiles: + - f_xinitrc + include: + - host2 + host2: + dotfiles: + - f_vimrc +``` +Here profile *host1* contains all the dotfiles defined for *host2* plus `f_xinitrc`. + # Template Dotdrop leverage the power of [jinja2](http://jinja.pocoo.org/) to handle the