1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 16:14:21 +00:00

add tests cleaning

This commit is contained in:
deadc0de6
2021-10-19 22:18:39 +02:00
parent f9c318679a
commit f4cff17f1b
110 changed files with 413 additions and 355 deletions

View File

@@ -67,6 +67,9 @@ echo "config file: ${cfg}"
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}"
clear_on_exit "${tmp}"
clear_on_exit "${tmpd}"
## RELATIVE
echo "RUNNING RELATIVE"
cat > ${cfg} << _EOF
@@ -124,6 +127,9 @@ echo "config file: ${cfg}"
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}"
clear_on_exit "${tmp}"
clear_on_exit "${tmpd}"
cat > ${cfg} << _EOF
config:
backup: true
@@ -176,6 +182,9 @@ echo "config file: ${cfg}"
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}"
clear_on_exit "${tmp}"
clear_on_exit "${tmpd}"
cat > ${cfg} << _EOF
config:
backup: true
@@ -206,8 +215,5 @@ cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -b -V
[ ! -e ${tmpd}/abc ] && echo "[ERROR] dotfile not installed" && exit 1
[ ! -h ${tmpd}/abc ] && echo "[ERROR] dotfile is not a symlink" && exit 1
## CLEANING
rm -rf ${tmp} ${tmpd}
echo "OK"
exit 0