build: clone into existing mountpoint if we must

This commit is contained in:
Franco Fichtner 2021-08-17 12:32:58 +02:00
parent e4ea27603f
commit f4fa806505
1 changed files with 4 additions and 2 deletions

View File

@ -333,8 +333,10 @@ git_clone()
fi
if [ -d "${1}" ]; then
echo -n ">>> Removing ${1}... "
rm -r "${1}"
echo -n ">>> Resetting ${1}... "
if ! rm -r "${1}" 2> /dev/null; then
rm -rf "${1}"/* "${1}"/.??*
fi
echo "done"
else
mkdir -p $(dirname ${1})