From d42d810ab1842c9568f655127491eeedf1d376fc Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 21 Nov 2020 15:02:47 +0100 Subject: [PATCH] update doc on chmod --- docs/config-format.md | 3 ++- docs/config.md | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/config-format.md b/docs/config-format.md index 3cc1649..8494a2b 100644 --- a/docs/config-format.md +++ b/docs/config-format.md @@ -46,7 +46,7 @@ Entry | Description `src` | dotfile path within the `dotpath` (dotfile with empty `src` are ignored and considered installed, can use `variables` and `dynvariables`, make sure to quote) `link` | define how this dotfile is installed. Possible values: *nolink*, *link*, *link_children* (see [Symlinking dotfiles](config.md#symlink-dotfiles)) (defaults to value of `link_dotfile_default`) `actions` | list of action keys that need to be defined in the **actions** entry below (see [actions](config-details.md#entry-actions)) -`chmod` | defines the file permission in octal notation to apply during installation (see [permissions](config.md#permissions)) +`chmod` | defines the file permissions in octal notation to apply during installation (see [permissions](config.md#permissions)) `cmpignore` | list of patterns to ignore when comparing (enclose in quotes when using wildcards, see [ignore patterns](config.md#ignore-patterns)) `ignoreempty` | if true empty template will not be deployed (defaults to value of `ignoreempty`) `instignore` | list of patterns to ignore when installing (enclose in quotes when using wildcards, see [ignore patterns](config.md#ignore-patterns)) @@ -73,6 +73,7 @@ Entry | Description actions: - template: (true|false) + chmod: '' trans_read: trans_write: ``` diff --git a/docs/config.md b/docs/config.md index b6863b1..973974f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -61,10 +61,23 @@ Here are some rules on the use of variables in configs: ## Permissions -Dotdrop allows to control the permission applied to a dotfile using the +Dotdrop allows to control the permissions applied to a dotfile using the config dotfile entry [chmod](config-format.md#dotfiles-entry). -A [chmod](config-format.md#dotfiles-entry) entry on a directory is applied to the -directory only, not recursively. +A [chmod](config-format.md#dotfiles-entry) entry on a directory +is applied to the directory only, not recursively. + +For example +```yaml +dotfiles: + f_file: + src: file + dst: ~/file + chmod: 644 + f_dir: + src: dir + dst: ~/dir + chmod: 744 +``` On `import` the following rules are applied: