Skip to content

Commit

Permalink
Check if CUSTOM_SRC_PATH contains Wine sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Kron4ek authored Oct 23, 2021
1 parent 2c127c8 commit 537deb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build_wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 537deb9

Please sign in to comment.