Skip to content

Commit

Permalink
curl.sh: try permalinking to the curl patch set 1
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Jun 4, 2024
1 parent 8bb77c8 commit 061a219
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions curl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 061a219

Please sign in to comment.