Will now check for symlinks too
This commit is contained in:
parent
b4af1cb111
commit
99232da3a1
1 changed files with 4 additions and 4 deletions
|
@ -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."
|
||||
|
|
Reference in a new issue