1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00
This commit is contained in:
deadc0de6
2022-05-30 09:50:00 +02:00
committed by deadc0de
parent 493479079e
commit 808b9607ec
8 changed files with 11 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
#echo "dotfile destination: ${tmpd}" #echo "dotfile destination: ${tmpd}"
# workdir # workdir
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
# temp # temp
tmpa=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpa=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`

View File

@@ -55,6 +55,7 @@ tmpd=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}" echo "dotfiles destination: ${tmpd}"
# the workdir # the workdir
tmpw=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
echo "workdir: ${tmpw}" echo "workdir: ${tmpw}"
clear_on_exit "${tmps}" clear_on_exit "${tmps}"

View File

@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}" echo "dotfiles destination: ${tmpd}"
# the workdir # the workdir
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
echo "workdir: ${tmpw}" echo "workdir: ${tmpw}"
clear_on_exit "${tmps}" clear_on_exit "${tmps}"

View File

@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}" echo "dotfiles destination: ${tmpd}"
# the workdir # the workdir
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
echo "workdir: ${tmpw}" echo "workdir: ${tmpw}"
clear_on_exit "${tmps}" clear_on_exit "${tmps}"

View File

@@ -52,6 +52,7 @@ mkdir -p ${tmps}/dotfiles
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
#echo "dotfile destination: ${tmpd}" #echo "dotfile destination: ${tmpd}"
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
clear_on_exit "${tmps}" clear_on_exit "${tmps}"
clear_on_exit "${tmpd}" clear_on_exit "${tmpd}"
@@ -132,7 +133,8 @@ grep 'file1' ${tmpd}/abc2
grep 'file2' ${tmpd}/def/afile grep 'file2' ${tmpd}/def/afile
grep 'This dotfile is managed using dotdrop' ${tmpd}/ghi grep 'This dotfile is managed using dotdrop' ${tmpd}/ghi
grep 'This dotfile is managed using dotdrop' ${tmpd}/jkl/anotherfile grep 'This dotfile is managed using dotdrop' ${tmpd}/jkl/anotherfile
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/ghi)") =~ ^/ ]] && echo "ghi not subpath of workdir" && exit 1
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/ghi)") =~ "^/" ]] && echo "ghi not subpath of workdir" && exit 1
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/jkl)") =~ ^/ ]] && echo "jkl not subpath of workdir" && exit 1 [[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/jkl)") =~ ^/ ]] && echo "jkl not subpath of workdir" && exit 1
## TODO test with install path children of dotpath ## TODO test with install path children of dotpath

View File

@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
echo "dotfiles destination: ${tmpd}" echo "dotfiles destination: ${tmpd}"
# the workdir # the workdir
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
export DOTDROP_WORKDIR="${tmpw}"
echo "workdir: ${tmpw}" echo "workdir: ${tmpw}"
clear_on_exit "${tmps}" clear_on_exit "${tmps}"

View File

@@ -53,6 +53,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
tmpf="${tmp}/dotfiles" tmpf="${tmp}/dotfiles"
tmpw="${tmp}/workdir" tmpw="${tmp}/workdir"
export DOTDROP_WORKDIR="${tmpw}"
mkdir -p ${tmpf} mkdir -p ${tmpf}
echo "dotfiles source (dotpath): ${tmpf}" echo "dotfiles source (dotpath): ${tmpf}"

View File

@@ -53,6 +53,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
tmpf="${tmp}/dotfiles" tmpf="${tmp}/dotfiles"
tmpw="${tmp}/workdir" tmpw="${tmp}/workdir"
export DOTDROP_WORKDIR="${tmpw}"
mkdir -p ${tmpf} mkdir -p ${tmpf}
echo "dotfiles source (dotpath): ${tmpf}" echo "dotfiles source (dotpath): ${tmpf}"
@@ -113,6 +114,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
tmpf="${tmp}/dotfiles" tmpf="${tmp}/dotfiles"
tmpw="${tmp}/workdir" tmpw="${tmp}/workdir"
export DOTDROP_WORKDIR="${tmpw}"
mkdir -p ${tmpf} mkdir -p ${tmpf}
echo "dotfiles source (dotpath): ${tmpf}" echo "dotfiles source (dotpath): ${tmpf}"