mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-06 04:23:01 +00:00
Fixing :optional import attribute for globbed paths
This commit is contained in:
@@ -65,12 +65,15 @@ config:
|
||||
import_variables:
|
||||
- /variables/does/not/exist:optional
|
||||
- /variables/does/not/::exist:optional
|
||||
- /variables/*/not/exist:optional
|
||||
import_actions:
|
||||
- /actions/does/not/exist:optional
|
||||
- /actions/does/not/::exist:optional
|
||||
- /actions/does/*/exist:optional
|
||||
import_configs:
|
||||
- /configs/does/not/exist:optional
|
||||
- /configs/does/not/::exist:optional
|
||||
- /configs/does/not/*:optional
|
||||
dotfiles:
|
||||
f_abc:
|
||||
dst: ${tmpd}/abc
|
||||
@@ -108,6 +111,29 @@ cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "variables" && exit 1
|
||||
set -e
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
config:
|
||||
backup: true
|
||||
create: true
|
||||
dotpath: dotfiles
|
||||
import_variables:
|
||||
- /variables/*/not/exist
|
||||
dotfiles:
|
||||
f_abc:
|
||||
dst: ${tmpd}/abc
|
||||
src: abc
|
||||
profiles:
|
||||
p1:
|
||||
dotfiles:
|
||||
- f_abc
|
||||
_EOF
|
||||
|
||||
# dummy call
|
||||
set +e
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "variables glob" && exit 1
|
||||
set -e
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
config:
|
||||
backup: true
|
||||
@@ -131,6 +157,29 @@ cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "actions" && exit 1
|
||||
set -e
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
config:
|
||||
backup: true
|
||||
create: true
|
||||
dotpath: dotfiles
|
||||
import_actions:
|
||||
- /actions/does/*/exist
|
||||
dotfiles:
|
||||
f_abc:
|
||||
dst: ${tmpd}/abc
|
||||
src: abc
|
||||
profiles:
|
||||
p1:
|
||||
dotfiles:
|
||||
- f_abc
|
||||
_EOF
|
||||
|
||||
# dummy call
|
||||
set +e
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "actions glob" && exit 1
|
||||
set -e
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
config:
|
||||
backup: true
|
||||
@@ -154,6 +203,29 @@ cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "configs" && exit 1
|
||||
set -e
|
||||
|
||||
cat > ${cfg} << _EOF
|
||||
config:
|
||||
backup: true
|
||||
create: true
|
||||
dotpath: dotfiles
|
||||
import_configs:
|
||||
- /configs/does/not/*
|
||||
dotfiles:
|
||||
f_abc:
|
||||
dst: ${tmpd}/abc
|
||||
src: abc
|
||||
profiles:
|
||||
p1:
|
||||
dotfiles:
|
||||
- f_abc
|
||||
_EOF
|
||||
|
||||
# dummy call
|
||||
set +e
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
[ "$?" = "0" ] && echo "configs glob" && exit 1
|
||||
set -e
|
||||
|
||||
## CLEANING
|
||||
rm -rf ${tmps} ${tmpd}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user