From 061a21931f4fc2495ddfc3d045850774100ca977 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 4 Jun 2024 17:12:17 +0200 Subject: [PATCH] curl.sh: try permalinking to the curl patch set 1 --- curl.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/curl.sh b/curl.sh index 65286f1d7..b7979c20e 100755 --- a/curl.sh +++ b/curl.sh @@ -373,11 +373,14 @@ _VER="$1" options+=' -DBUILD_CURL_EXE=OFF' fi - patch="../${_NAM}${_PATCHSUFFIX}.patch" + patch="${_NAM}${_PATCHSUFFIX}.patch" if [ -f "${patch}" ]; then - patchstamp="$(grep -E -o '[a-f0-9]{32,}' "${patch}" | cut -c -8 | tr $'\n' ',' | sed -e 's/,$//')" - # Appearing as: "security patched: abcd0123,12345678" - [ -n "${patchstamp}" ] && CPPFLAGS+=" -DCURL_PATCHSTAMP=\\\"${patchstamp}\\\"" + hash="$(git --git-dir ../.git log -1 '--pretty=format:%h' "../${patch}")" + if [ -n "${hash}" ]; then + patchstamp="https://github.com/curl/curl-for-win/blob/${hash}/${patch}" + # Appearing as: "security patched: https://github.com/curl/curl-for-win/blob/95a0e6df/curl.test.patch" + [ -n "${patchstamp}" ] && CPPFLAGS+=" -DCURL_PATCHSTAMP=\\\"${patchstamp}\\\"" + fi fi if [ "${CW_DEV_INCREMENTAL:-}" != '1' ] || [ ! -d "${_BLDDIR}" ]; then