mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-16 22:34:10 +00:00
ensure dotfile link default works
This commit is contained in:
@@ -56,6 +56,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests'`
|
|||||||
mkdir -p ${tmps}/dotfiles/abc
|
mkdir -p ${tmps}/dotfiles/abc
|
||||||
echo "test link_dotfile_default 1" > ${tmps}/dotfiles/abc/file1
|
echo "test link_dotfile_default 1" > ${tmps}/dotfiles/abc/file1
|
||||||
echo "test link_dotfile_default 2" > ${tmps}/dotfiles/abc/file2
|
echo "test link_dotfile_default 2" > ${tmps}/dotfiles/abc/file2
|
||||||
|
echo "should be linked" > ${tmps}/dotfiles/def
|
||||||
|
|
||||||
# create a shell script
|
# create a shell script
|
||||||
# create the config file
|
# create the config file
|
||||||
@@ -101,10 +102,14 @@ dotfiles:
|
|||||||
d_abc:
|
d_abc:
|
||||||
dst: ${tmpd}/abc
|
dst: ${tmpd}/abc
|
||||||
src: abc
|
src: abc
|
||||||
|
f_def:
|
||||||
|
dst: ${tmpd}/def
|
||||||
|
src: def
|
||||||
profiles:
|
profiles:
|
||||||
p1:
|
p1:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_abc
|
- d_abc
|
||||||
|
- f_def
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
# install
|
# install
|
||||||
@@ -120,6 +125,10 @@ cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V
|
|||||||
[ -h ${tmpd}/abc/file2 ] && echo "not a regular file" && exit 1
|
[ -h ${tmpd}/abc/file2 ] && echo "not a regular file" && exit 1
|
||||||
rm -rf ${tmpd}/abc
|
rm -rf ${tmpd}/abc
|
||||||
|
|
||||||
|
[ ! -e ${tmpd}/def ] && echo "not exist" && exit 1
|
||||||
|
[ ! -h ${tmpd}/def ] && echo "not a symlink" && exit 1
|
||||||
|
rm -f ${tmpd}/def
|
||||||
|
|
||||||
cat > ${cfg} << _EOF
|
cat > ${cfg} << _EOF
|
||||||
config:
|
config:
|
||||||
backup: true
|
backup: true
|
||||||
|
|||||||
Reference in New Issue
Block a user