mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 13:48:48 +00:00
Merge branch 'master' of github.com:deadc0de6/dotdrop
This commit is contained in:
@@ -16,8 +16,12 @@ Four types of actions can be defined:
|
||||
* [Profile actions](#profile-actions)
|
||||
* [Fake dotfiles and actions](#fake-dotfile-and-actions)
|
||||
|
||||
**Note**: any action with a key starting with an underscore (`_`) won't be shown in output.
|
||||
This can be useful when working with sensitive data containing passwords for example.
|
||||
**Notes**:
|
||||
|
||||
* Any action with a key starting with an underscore (`_`) won't be shown in output. This can be useful when working with sensitive data containing passwords for example.
|
||||
* Make sure to quote your actions to avoid bad surprises
|
||||
* Actions are executed using the default shell (`$SHELL`)
|
||||
* To use shell variables in your actions you need to escape the curly brackets (`${HOME}` becomes `${{HOME}}`)
|
||||
|
||||
### Dotfile actions
|
||||
|
||||
@@ -181,8 +185,12 @@ For examples of transformation uses, see
|
||||
* [Handle compressed directories](howto/store-compressed-directories.md)
|
||||
* [Handle secrets](howto/sensitive-dotfiles.md)
|
||||
|
||||
**Note**: any transformation with a key starting with an underscore (`_`) won't be shown in output.
|
||||
This can be useful when working with sensitive data containing passwords for example.
|
||||
**Notes**:
|
||||
|
||||
* Any transformation with a key starting with an underscore (`_`) won't be shown in output. This can be useful when working with sensitive data containing passwords for example.
|
||||
* Make sure to quote your transformations to avoid bad surprises
|
||||
* Transformations are executed using the default shell (`$SHELL`)
|
||||
* To use shell variables in your transformations you need to escape the curly brackets (`${HOME}` becomes `${{HOME}}`)
|
||||
|
||||
There are two types of transformations available:
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ actions:
|
||||
preaction: echo 'pre' > ${tmpa}/pre
|
||||
preaction2: echo 'pre2' > ${tmpa}/pre2
|
||||
fake_pre: echo 'fake pre' > ${tmpa}/fake_pre
|
||||
expandvariable: "myvar=xxx; echo \${{myvar}} > ${tmpa}/expandvariable"
|
||||
post:
|
||||
postaction: echo 'post' > ${tmpa}/post
|
||||
postaction2: echo 'post2' > ${tmpa}/post2
|
||||
@@ -84,6 +85,7 @@ dotfiles:
|
||||
- preaction2
|
||||
- postaction2
|
||||
- _silentaction
|
||||
- expandvariable
|
||||
f_fake:
|
||||
dst:
|
||||
src:
|
||||
@@ -119,6 +121,8 @@ grep post ${tmpa}/post2 >/dev/null
|
||||
grep "executing \"echo 'naked' > ${tmpa}/naked" ${tmpa}/log >/dev/null
|
||||
grep "executing \"echo 'silent'" ${tmpa}/log >/dev/null && false
|
||||
grep "executing silent action \"_silentaction\"" ${tmpa}/log >/dev/null
|
||||
[ ! -e ${tmpa}/expandvariable ] && exit 1
|
||||
grep xxx ${tmpa}/expandvariable >/dev/null
|
||||
|
||||
# fake action
|
||||
[ ! -e ${tmpa}/fake ] && echo 'fake post action not executed' && exit 1
|
||||
|
||||
Reference in New Issue
Block a user