From 537deb9d12bb332e2d590261c80458eb67e203ee Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Sat, 23 Oct 2021 14:39:08 +0500 Subject: [PATCH] Check if CUSTOM_SRC_PATH contains Wine sources --- build_wine.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_wine.sh b/build_wine.sh index f351a73..dd3e728 100755 --- a/build_wine.sh +++ b/build_wine.sh @@ -279,15 +279,15 @@ echo "Downloading sources and patches" echo "Preparing Wine for compilation" echo -if [ ! -z "${CUSTOM_SRC_PATH}" ]; then +if [ -n "${CUSTOM_SRC_PATH}" ]; then is_url="$(echo "${CUSTOM_SRC_PATH}" | head -c 6)" if [ "${is_url}" = "git://" ] || [ "${is_url}" = "https:" ]; then git clone "${CUSTOM_SRC_PATH}" wine else - if [ ! -d "${CUSTOM_SRC_PATH}" ]; then - echo "CUSTOM_SRC_PATH is set to a non-existing directory!" - echo "Please make sure to use a correct path." + if [ ! -f "${CUSTOM_SRC_PATH}"/configure ]; then + echo "CUSTOM_SRC_PATH is set to an incorrect or non-existent directory!" + echo "Please make sure to use a directory with correct Wine sources." exit 1 fi