From f1ac0f0f8227302aaba6dd348c06e301363eca2c Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 11 Mar 2024 00:36:21 +0100 Subject: [PATCH] Fix conflict resolution (again) --- buildtool.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buildtool.sh b/buildtool.sh index eea849e..08738cf 100755 --- a/buildtool.sh +++ b/buildtool.sh @@ -314,14 +314,18 @@ function ask_clonedir_conflictresolution() { exit 1 ;; "r"|"R") - export "BUILDTOOL_MAKEPKG_REUSE= --noextract --force" + if [ -a "${BUILDTOOL_CLONEDIR}/src" ]; then + export "BUILDTOOL_MAKEPKG_REUSE= --noextract" + elif [ -a "${BUILDTOOL_CLONEDIR}/pkg" ]; then + export "BUILDTOOL_MAKEPKG_REUSE=${BUILDTOOL_MAKEPKG_REUSE} --force" + fi ;; "f"|"F") infoh "Removing existing \$BUILDTOOL_CLONEDIR directory" rm -rf "${BUILDTOOL_CLONEDIR}" ;; *) - errorh "Invalid answer. Please answer with Y, N or I." + errorh "Invalid answer. Please answer with Y, N or I" ask_debug esac }