mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 01:29:17 +00:00
update chmod doc
This commit is contained in:
@@ -61,27 +61,29 @@ Here are some rules on the use of variables in configs:
|
|||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
Dotfile allows to control the permission applied to a dotfile using the
|
Dotdrop allows to control the permission applied to a dotfile using the
|
||||||
config dotfile entry `chmod`.
|
config dotfile entry [chmod](config-format.md#dotfiles-entry).
|
||||||
A `chmod` 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.
|
||||||
|
|
||||||
On `import` the following rules are applied:
|
On `import` the following rules are applied:
|
||||||
|
|
||||||
* if the `-m --preserve-mode` switch is provided the imported file permissions are
|
* if the `-m --preserve-mode` switch is provided the imported file permissions are
|
||||||
|
stored in a `chmod` entry
|
||||||
|
* if imported file permissions differ from umask then its permissions are automatically
|
||||||
stored in the `chmod` entry
|
stored in the `chmod` entry
|
||||||
* if imported file permissions differ from umask its permissions are automatically
|
* otherwise no `chmod` entry is added
|
||||||
stored in the `chmod` entry
|
|
||||||
|
|
||||||
On `install` the following rules are applied:
|
On `install` the following rules are applied:
|
||||||
|
|
||||||
* if `chmod` is specified in the dotfile, it will be applied to the installed dotfile
|
* if `chmod` is specified in the dotfile, it will be applied to the installed dotfile
|
||||||
* if file exists and its permissions differ from `umask` and no `chmod` is specified user needs
|
* if no `chmod` is specified and the file exists on the filesystem with different permissions than the file in the `dotpath`
|
||||||
to confirm installation (unless `-f --force` is used or the permission match the dotfile in the `dotpath`)
|
then the user needs to confirm the dotfile installation (unless `-f --force` is used)
|
||||||
|
|
||||||
On `update`:
|
On `update`:
|
||||||
|
|
||||||
* no `chmod` entry is added/updated in the config however the rights are mirrored from the filesystem to the
|
* no `chmod` entry is added/updated in the config however the rights are mirrored
|
||||||
file in `dotpath`
|
from the filesystem to the dotfile in the `dotpath`
|
||||||
|
|
||||||
## Symlink dotfiles
|
## Symlink dotfiles
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user