1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-11 02:04:15 +00:00

fix action usage variable expansion

This commit is contained in:
deadc0de6
2019-06-19 16:07:29 +02:00
parent 44723dc032
commit 1888a09ad7
3 changed files with 22 additions and 13 deletions

View File

@@ -85,10 +85,10 @@ profiles:
- profileaction '{{@@ var_profile @@}}'
- dynaction '{{@@ user_name @@}}'
variables:
var_pre: var_pre
var_post: var_post
var_naked: var_naked
var_profile: var_profile
var_pre: abc
var_post: def
var_naked: ghi
var_profile: jkl
dynvariables:
user_name: 'echo $USER'
_EOF
@@ -106,10 +106,15 @@ cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V
[ ! -e ${tmpa}/naked ] && echo 'naked action not executed' && exit 1
[ ! -e ${tmpa}/profile ] && echo 'profile action not executed' && exit 1
[ ! -e ${tmpa}/dyn ] && echo 'dynamic acton action not executed' && exit 1
grep var_pre ${tmpa}/pre >/dev/null
grep var_post ${tmpa}/post >/dev/null
grep var_naked ${tmpa}/naked >/dev/null
grep var_profile ${tmpa}/profile >/dev/null
cat ${tmpa}/pre
grep abc ${tmpa}/pre >/dev/null
cat ${tmpa}/post
grep def ${tmpa}/post >/dev/null
cat ${tmpa}/naked
grep ghi ${tmpa}/naked >/dev/null
cat ${tmpa}/profile
grep jkl ${tmpa}/profile >/dev/null
cat ${tmpa}/dyn
grep "$USER" ${tmpa}/dyn >/dev/null
## CLEANING