1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 23:39:16 +00:00

fix cyclic ref between var and dvar for #252

This commit is contained in:
deadc0de6
2020-08-25 08:14:08 +02:00
parent 393bd3afe4
commit 09aac991a4
3 changed files with 48 additions and 5 deletions

View File

@@ -69,10 +69,12 @@ config:
dotpath: dotfiles
variables:
var1: "this is some test"
var2: "the_dvar4"
dynvariables:
dvar1: head -1 /proc/meminfo
dvar2: "echo 'this is some test' | rev | tr ' ' ','"
dvar3: ${scr}
dvar4: "echo {{@@ var2 @@}} | rev"
dotfiles:
f_abc:
dst: ${tmpd}/abc
@@ -89,17 +91,19 @@ echo "{{@@ var1 @@}}" > ${tmps}/dotfiles/abc
echo "{{@@ dvar1 @@}}" >> ${tmps}/dotfiles/abc
echo "{{@@ dvar2 @@}}" >> ${tmps}/dotfiles/abc
echo "{{@@ dvar3 @@}}" >> ${tmps}/dotfiles/abc
echo "{{@@ dvar4 @@}}" >> ${tmps}/dotfiles/abc
echo "test" >> ${tmps}/dotfiles/abc
# install
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V
#cat ${tmpd}/abc
cat ${tmpd}/abc
grep '^this is some test' ${tmpd}/abc >/dev/null
grep "^MemTotal" ${tmpd}/abc >/dev/null
grep '^tset,emos,si,siht' ${tmpd}/abc >/dev/null
grep "^${TESTENV}" ${tmpd}/abc > /dev/null
grep '^4ravd_eht' ${tmpd}/abc >/dev/null
#cat ${tmpd}/abc