From ce6e652408ad371b19f696cbbb944ad00936ece1 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 11 Mar 2024 01:51:22 +0100 Subject: [PATCH] Fix conflict resolution with local dir enabled --- buildtool.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buildtool.sh b/buildtool.sh index 0a3b389..5dc71f4 100755 --- a/buildtool.sh +++ b/buildtool.sh @@ -80,7 +80,7 @@ fi errore "set the \$BUILDTOOL_COMPILE_NONARCH environment variable to \"true\"" exit 1 else - warnh "Compiling on a non-arch distribution. This may lead to unexpected errors!" + warnh "\$BUILDTOOL_COMPILE_NONARCH is set, allowing compiling on a non-arch distribution" fi fi ) @@ -303,7 +303,11 @@ function ask_clonedir_conflictresolution() { if [ -n "${BUILDTOOL_LOCALDIR}" ]; then warnh "Skipped conflict resolution (\$BUILDTOOL_LOCALDIR is set)" export "BUILDTOOL_CLONEDIR_CONFLICT=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 return fi if [ ! -d "${BUILDTOOL_CLONEDIR}" ] && [ ! -L "${BUILDTOOL_CLONEDIR}" ]; then