diff --git a/buildtool.sh b/buildtool.sh index cd691f2..b5f16fb 100755 --- a/buildtool.sh +++ b/buildtool.sh @@ -286,10 +286,10 @@ function ask_debug() { } ## Ask for clone directory conflict resolution (includes check) function ask_clonedir_conflictresolution() { - if [ ! -d "${BUILDTOOL_CLONEDIR}" ]; then + if [ ! -d "${BUILDTOOL_CLONEDIR}" ] && [ ! -L "${BUILDTOOL_CLONEDIR}" ]; then return - elif [ -a "${BUILDTOOL_CLONEDIR}" ] && [ ! -d "${BUILDTOOL_CLONEDIR}" ]; then - warnh "Something that isn't a directory exists at location \"${BUILDTOOL_CLONEDIR}\"" + elif [ -a "${BUILDTOOL_CLONEDIR}" ] && [ ! -d "${BUILDTOOL_CLONEDIR}" ] && [ ! -L "${BUILDTOOL_CLONEDIR}" ]; then + warnh "Something that isn't a directory or symlink exists at location \"${BUILDTOOL_CLONEDIR}\"" fi read -rp "$(infoh "Warning: \"${BUILDTOOL_CLONEDIR}\" already exists. What should be done to resolve the conflict [A(bort)/r(ecompile)/f(resh)]? ")" BUILDTOOL_CLONEDIR_CONFLICT case "${BUILDTOOL_CLONEDIR_CONFLICT}" in @@ -302,7 +302,7 @@ function ask_clonedir_conflictresolution() { ;; "f"|"F") infoh "Removing existing \$BUILDTOOL_CLONEDIR directory" - #rm -rf "${BUILDTOOL_CLONEDIR}" + rm -rf "${BUILDTOOL_CLONEDIR}" ;; *) errorh "Invalid answer. Please answer with Y, N or I."