mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 02:49:20 +00:00
update readme
This commit is contained in:
25
README.md
25
README.md
@@ -418,6 +418,31 @@ If you don't specify neither `post` nor `pre`, the action will be executed
|
|||||||
after the dotfile deployment (which is equivalent to `post`).
|
after the dotfile deployment (which is equivalent to `post`).
|
||||||
Actions cannot obviously be named `pre` or `post`.
|
Actions cannot obviously be named `pre` or `post`.
|
||||||
|
|
||||||
|
Action can even be parameterized. You can define an action taking one or more
|
||||||
|
arguments which will be replaced depending on its use on different dotfiles.
|
||||||
|
For example:
|
||||||
|
```bash
|
||||||
|
actions:
|
||||||
|
echoaction: echo '{0}' >> {1}
|
||||||
|
...
|
||||||
|
dotfiles:
|
||||||
|
f_vimrc:
|
||||||
|
dst: ~/.vimrc
|
||||||
|
src: vimrc
|
||||||
|
actions:
|
||||||
|
- echoaction "vim installed" /tmp/mydotdrop.log
|
||||||
|
f_xinitrc:
|
||||||
|
dst: ~/.xinitrc
|
||||||
|
src: xinitrc
|
||||||
|
actions:
|
||||||
|
- echoaction "xinitrc installed" /tmp/myotherlog.log
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
The above will execute `echo 'vim installed' > /tmp/mydotdrop.log` when
|
||||||
|
vimrc is installed and `echo 'xinitrc installed' > /tmp/myotherlog.log'`
|
||||||
|
when xinitrc is installed.
|
||||||
|
|
||||||
## Use transformations
|
## Use transformations
|
||||||
|
|
||||||
Transformations are used to transform a dotfile before it is
|
Transformations are used to transform a dotfile before it is
|
||||||
|
|||||||
Reference in New Issue
Block a user