mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 00:19:15 +00:00
implement transformation parameters (#177)
This commit is contained in:
@@ -56,11 +56,6 @@ echo "dotfiles destination: ${tmpd}"
|
||||
# create the config file
|
||||
cfg="${tmps}/config.yaml"
|
||||
|
||||
# token
|
||||
token="test-base64"
|
||||
tokend="compressed archive"
|
||||
touched="touched"
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
trans_read:
|
||||
r_echo_abs_src: echo "\$(cat {0}); {{@@ _dotfile_abs_src @@}}" > {1}
|
||||
@@ -84,7 +79,7 @@ dotfiles:
|
||||
src: abc
|
||||
trans_read: r_echo_abs_src
|
||||
trans_write: w_echo_key
|
||||
d_ghi:
|
||||
f_ghi:
|
||||
dst: ${tmpd}/ghi
|
||||
src: ghi
|
||||
trans_read: r_echo_var
|
||||
@@ -94,7 +89,7 @@ profiles:
|
||||
dotfiles:
|
||||
- f_abc
|
||||
- f_def
|
||||
- d_ghi
|
||||
- f_ghi
|
||||
_EOF
|
||||
#cat ${cfg}
|
||||
|
||||
@@ -116,9 +111,9 @@ cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -b -V
|
||||
[ ! -e ${tmpd}/ghi ] && exit 1
|
||||
grep marker ${tmpd}/def
|
||||
cat ${tmpd}/abc
|
||||
grep "abc; ${tmps}/dotfiles/abc" ${tmpd}/abc
|
||||
grep "^abc; ${tmps}/dotfiles/abc$" ${tmpd}/abc
|
||||
cat ${tmpd}/ghi
|
||||
grep "ghi; readvar" ${tmpd}/ghi
|
||||
grep "^ghi; readvar$" ${tmpd}/ghi
|
||||
|
||||
###########################
|
||||
# test update
|
||||
@@ -133,9 +128,9 @@ cd ${ddpath} | ${bin} update -f -k -c ${cfg} -p p1 -b -V
|
||||
[ ! -e ${tmps}/dotfiles/ghi ] && exit 1
|
||||
grep marker ${tmps}/dotfiles/def
|
||||
cat ${tmps}/dotfiles/abc
|
||||
grep "abc; ${tmps}/dotfiles/abc; f_abc" ${tmps}/dotfiles/abc
|
||||
grep "^abc; ${tmps}/dotfiles/abc; f_abc$" ${tmps}/dotfiles/abc
|
||||
cat ${tmps}/dotfiles/ghi
|
||||
grep "ghi; readvar; writevar" ${tmps}/dotfiles/ghi
|
||||
grep "^ghi; readvar; writevar$" ${tmps}/dotfiles/ghi
|
||||
|
||||
## CLEANING
|
||||
rm -rf ${tmps} ${tmpd}
|
||||
|
||||
Reference in New Issue
Block a user