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