1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

update doc and tests for link

This commit is contained in:
deadc0de6
2022-05-31 18:24:30 +02:00
committed by deadc0de
parent cda6d08f5f
commit fa1be9d29c
16 changed files with 41 additions and 40 deletions

View File

@@ -142,7 +142,7 @@ mkdir -p ${tmps}/dotfiles
# import without --preserve-mode and link
for i in ${toimport}; do
cd ${ddpath} | ${bin} import -c ${cfg} -l link -f -p p1 -V ${i}
cd ${ddpath} | ${bin} import -c ${cfg} -l absolute -f -p p1 -V ${i}
done
cat ${cfg}
@@ -155,7 +155,7 @@ cnt=`cat ${cfg} | grep "chmod: '777'" | wc -l`
[ "${cnt}" != "${tot}" ] && echo "not all chmod inserted (2)" && exit 1
tot=`echo ${toimport} | wc -w`
cnt=`cat ${cfg} | grep 'link: link' | wc -l`
cnt=`cat ${cfg} | grep 'link: absolute' | wc -l`
[ "${cnt}" != "${tot}" ] && echo "not all link inserted" && exit 1
## --preserve-mode

View File

@@ -129,7 +129,7 @@ set -e
# test values have been correctly updated
echo "========> test for updated entries"
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_link' | head -1 | grep ',link:link,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_link' | head -1 | grep ',link:absolute,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_nolink' | head -1 | grep ',link:nolink,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_nolink1' | head -1 | grep ',link:nolink,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_children' | head -1 | grep ',link:link_children,'

View File

@@ -102,7 +102,7 @@ inside="${tmps}/dotfiles/${tmpd}/abc"
[ ! -e ${inside} ] && exit 1
cat ${cfg}
cat ${cfg} | grep 'link: link' >/dev/null
cat ${cfg} | grep 'link: absolute' >/dev/null
echo "OK"
exit 0

View File

@@ -181,11 +181,11 @@ _EOF
# import
df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=link
cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=absolute
# checks
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,'
# try to install
rm -rf ${tmpd}/qwert
@@ -219,7 +219,7 @@ cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,'
# try to install
rm -rf ${tmpd}/qwert
@@ -349,11 +349,11 @@ _EOF
# import
df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -f -c ${cfg} --link=link -p p1 ${df} -V
cd ${ddpath} | ${bin} import -f -c ${cfg} --link=absolute -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link,'
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,'
# try to install
rm -rf ${tmpd}/qwert

View File

@@ -80,7 +80,7 @@ cd ${ddpath} | ${bin} compare -c ${cfg} -p p1 -V
# ensure minversion is present
cat ${cfg}
grep 'link: link' ${cfg}
grep 'link: absolute' ${cfg}
grep 'minversion' ${cfg}
# fake a higher version