1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 13:09:17 +00:00

refactor command "listfiles" to "files"

This commit is contained in:
deadc0de6
2019-11-27 19:11:31 +01:00
parent 77527d92c6
commit 8844084999
10 changed files with 48 additions and 48 deletions

View File

@@ -125,7 +125,7 @@ set -e
# test values have been correctly updated
echo "========> test for updated entries"
dotfiles=`cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 | grep -v '^ '`
dotfiles=`cd ${ddpath} | ${bin} files -c ${cfg} -p p1 | grep -v '^ '`
echo "${dotfiles}" | grep '^f_link ' | grep ', link: link)'
echo "${dotfiles}" | grep '^f_nolink ' | grep ', link: nolink)'
echo "${dotfiles}" | grep '^f_nolink1 ' | grep ', link: nolink)'

View File

@@ -94,7 +94,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p2 \
${tmpd}/sub/sub2/abc
# count dotfiles for p2
cnt=`cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p2 -b | grep '^f_' | wc -l`
cnt=`cd ${ddpath} | ${bin} files -c ${cfg} -p p2 -b | grep '^f_' | wc -l`
[ "${cnt}" != "4" ] && exit 1
## CLEANING

View File

@@ -116,12 +116,12 @@ echo "zzz" > ${tmps}/dotfiles/zzz
echo "sub" > ${tmps}/dotfiles/sub
# install
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p p0 -V | grep f_def
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p p1 -V | grep f_abc
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p p2 -V | grep f_def
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p p3 -V | grep f_zzz
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p pup -V | grep f_sub
cd ${ddpath} | ${bin} listfiles -c ${cfg1} -p psubsub -V | grep f_sub
cd ${ddpath} | ${bin} files -c ${cfg1} -p p0 -V | grep f_def
cd ${ddpath} | ${bin} files -c ${cfg1} -p p1 -V | grep f_abc
cd ${ddpath} | ${bin} files -c ${cfg1} -p p2 -V | grep f_def
cd ${ddpath} | ${bin} files -c ${cfg1} -p p3 -V | grep f_zzz
cd ${ddpath} | ${bin} files -c ${cfg1} -p pup -V | grep f_sub
cd ${ddpath} | ${bin} files -c ${cfg1} -p psubsub -V | grep f_sub
## CLEANING
rm -rf ${tmps} ${tmpd}

View File

@@ -88,7 +88,7 @@ _EOF
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 -V --link=link_children ${dt}
# check is set to link_children
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "d_`basename ${dt}`")
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${dt}`")
echo ${line} | grep 'link: link_children'
# checks file exists in dotpath

View File

@@ -92,13 +92,13 @@ cd ${ddpath} | ${bin} compare -c ${cfg} -p p3
cd ${ddpath} | ${bin} compare -c ${cfg} -p p0
# list
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 | grep f_abc
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p2 | grep f_abc
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p3 | grep f_abc
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p0 | grep f_abc
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 | grep f_abc
cd ${ddpath} | ${bin} files -c ${cfg} -p p2 | grep f_abc
cd ${ddpath} | ${bin} files -c ${cfg} -p p3 | grep f_abc
cd ${ddpath} | ${bin} files -c ${cfg} -p p0 | grep f_abc
# count
cnt=`cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -b | grep '^f_' | wc -l`
cnt=`cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -b | grep '^f_' | wc -l`
[ "${cnt}" != "1" ] && exit 1
## CLEANING

View File

@@ -78,8 +78,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -113,8 +113,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -148,8 +148,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -183,8 +183,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=link
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: link'
# try to install
@@ -218,8 +218,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: link'
# try to install
@@ -253,8 +253,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -288,8 +288,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -323,8 +323,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: nolink'
# try to install
@@ -356,8 +356,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} --link=link -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
echo ${line} | grep 'link: link'
# try to install
@@ -418,8 +418,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} --link=link_children -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
echo ${line} | grep 'link: link_children'
# try to install
@@ -459,8 +459,8 @@ df="${tmpd}/qwert"
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
# checks
cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
echo ${line} | grep 'link: link_children'
# try to install