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)
|
## Ask for clone directory conflict resolution (includes check)
|
||||||
function ask_clonedir_conflictresolution() {
|
function ask_clonedir_conflictresolution() {
|
||||||
if [ ! -d "${BUILDTOOL_CLONEDIR}" ]; then
|
if [ ! -d "${BUILDTOOL_CLONEDIR}" ] && [ ! -L "${BUILDTOOL_CLONEDIR}" ]; then
|
||||||
return
|
return
|
||||||
elif [ -a "${BUILDTOOL_CLONEDIR}" ] && [ ! -d "${BUILDTOOL_CLONEDIR}" ]; then
|
elif [ -a "${BUILDTOOL_CLONEDIR}" ] && [ ! -d "${BUILDTOOL_CLONEDIR}" ] && [ ! -L "${BUILDTOOL_CLONEDIR}" ]; then
|
||||||
warnh "Something that isn't a directory exists at location \"${BUILDTOOL_CLONEDIR}\""
|
warnh "Something that isn't a directory or symlink exists at location \"${BUILDTOOL_CLONEDIR}\""
|
||||||
fi
|
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
|
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
|
case "${BUILDTOOL_CLONEDIR_CONFLICT}" in
|
||||||
|
@ -302,7 +302,7 @@ function ask_clonedir_conflictresolution() {
|
||||||
;;
|
;;
|
||||||
"f"|"F")
|
"f"|"F")
|
||||||
infoh "Removing existing \$BUILDTOOL_CLONEDIR directory"
|
infoh "Removing existing \$BUILDTOOL_CLONEDIR directory"
|
||||||
#rm -rf "${BUILDTOOL_CLONEDIR}"
|
rm -rf "${BUILDTOOL_CLONEDIR}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
errorh "Invalid answer. Please answer with Y, N or I."
|
errorh "Invalid answer. Please answer with Y, N or I."
|
||||||
|
|
Loading…
Reference in a new issue