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

fix dotfile src/dst not expanded with ext variables (#177)

This commit is contained in:
deadc0de6
2019-07-10 13:39:02 +02:00
parent 5e3dce92a9
commit a4a831195e
2 changed files with 22 additions and 9 deletions

View File

@@ -78,10 +78,14 @@ dotfiles:
f_abc:
dst: ${tmpd}/abc
src: abc
f_def:
dst: ${tmpd}/{{@@ theprofile @@}}
src: def
profiles:
p1:
dotfiles:
- f_abc
- f_def
variables:
varx: profvarx
provar: provar
@@ -107,6 +111,8 @@ echo "evar1: {{@@ evar1 @@}}" >> ${tmps}/dotfiles/abc
echo "provar: {{@@ provar @@}}" >> ${tmps}/dotfiles/abc
echo "theprofile: {{@@ theprofile @@}}" >> ${tmps}/dotfiles/abc
echo "theprofile: {{@@ theprofile @@}}" > ${tmps}/dotfiles/def
#cat ${tmps}/dotfiles/abc
# install
@@ -123,6 +129,10 @@ grep '^evar1: extevar1' ${tmpd}/abc >/dev/null
grep '^provar: provar' ${tmpd}/abc >/dev/null
grep '^theprofile: p1' ${tmpd}/abc >/dev/null
# check def
[ ! -e ${tmpd}/p1 ] && echo "def not created" && exit 1
grep '^theprofile: p1' ${tmpd}/p1 >/dev/null
rm -f ${tmpd}/abc
#cat ${tmpd}/abc