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

add test for included profile

This commit is contained in:
deadc0de6
2020-01-29 16:32:08 +01:00
parent a2b3ee2c41
commit d860c07f64

View File

@@ -59,6 +59,10 @@ config:
backup: true
create: true
dotpath: dotfiles
actions:
pre:
preaction: touch ${tmpd}/action.pre
postaction: touch ${tmpd}/action.post
dotfiles:
f_abc:
dst: ${tmpd}/abc
@@ -68,6 +72,9 @@ profiles:
include:
- p3
p1:
actions:
- preaction
- postaction
dotfiles:
- f_abc
p2:
@@ -77,13 +84,17 @@ profiles:
include:
- p2
_EOF
cat ${cfg}
# create the source
mkdir -p ${tmps}/dotfiles/
echo "test" > ${tmps}/dotfiles/abc
# install
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p0 --verbose
[ ! -e ${tmpd}/action.pre ] && exit 1
[ ! -e ${tmpd}/action.post ] && exit 1
# compare
cd ${ddpath} | ${bin} compare -c ${cfg} -p p1