mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 21:49:00 +00:00
update dynamic actions example
This commit is contained in:
21
README.md
21
README.md
@@ -962,17 +962,20 @@ Make sure to quote the path in the config file.
|
|||||||
Variables (`variables` and `dynvariables`) can be used
|
Variables (`variables` and `dynvariables`) can be used
|
||||||
in actions for more advanced use-cases:
|
in actions for more advanced use-cases:
|
||||||
|
|
||||||
For example
|
For example with variables
|
||||||
```yaml
|
```yaml
|
||||||
dynvariables:
|
dotfiles:
|
||||||
trizen_itself_available: (command -v trizen>/dev/null || cd /tmp; git clone https://aur.archlinux.org/trizen.git; cd trizen; makepkg -si)
|
f_test:
|
||||||
trizen_package_install: "{{@@ trizen_itself_available @@}} && trizen -S --needed"
|
dst: ~/.test
|
||||||
|
src: test
|
||||||
|
actions:
|
||||||
|
- cookie_mv_somewhere "/tmp/moved-cookie"
|
||||||
|
variables:
|
||||||
|
cookie_dir_available: (test -d /tmp/cookiedir || mkdir -p /tmp/cookiedir)
|
||||||
|
cookie_header: "{{@@ cookie_dir_available @@}} && echo 'header' > /tmp/cookiedir/cookie"
|
||||||
|
cookie_mv: "{{@@ cookie_header @@}} && mv /tmp/cookiedir/cookie"
|
||||||
actions:
|
actions:
|
||||||
trizen_install: "{{@@ trizen_package_install @@}} {0}"
|
cookie_mv_somewhere: "{{@@ cookie_mv @@}} {0}"
|
||||||
pre:
|
|
||||||
pip_install: "{{@@ trizen_package_install @@}} python-pip && pip install {0}"
|
|
||||||
yarn_install: "{{@@ trizen_package_install @@}} yarn && yarn global add {0}"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure to quote the actions using variables.
|
Make sure to quote the actions using variables.
|
||||||
|
|||||||
Reference in New Issue
Block a user