2019-07-25 04:07:31 +02:00
|
|
|
#!/bin/sh
|
2018-04-29 10:00:22 +02:00
|
|
|
|
2022-06-22 08:53:01 +02:00
|
|
|
CLONEURL=https://git.haproxy.org/git/haproxy-2.6.git
|
2023-01-24 19:25:51 +01:00
|
|
|
BASE_TAG=v2.6.8
|
2018-04-29 10:00:22 +02:00
|
|
|
TMP_REPODIR=tmprepo
|
|
|
|
PATCHESDIR=patches
|
|
|
|
|
|
|
|
if test -d "${TMP_REPODIR}"; then rm -rf "${TMP_REPODIR}"; fi
|
|
|
|
|
|
|
|
git clone "${CLONEURL}" "${TMP_REPODIR}"
|
|
|
|
|
|
|
|
printf "Cleaning patches\n"
|
|
|
|
find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \;
|
|
|
|
|
|
|
|
i=0
|
|
|
|
for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
|
2020-10-02 09:06:26 +02:00
|
|
|
filename="$(printf "%03d" $i)-$(git -C "${TMP_REPODIR}" log --format=%s -n 1 "$cid" | sed -e"s/[()']//g" -e's/[^_a-zA-Z0-9+-]\+/-/g' -e's/-$//').patch"
|
2019-07-25 04:07:31 +02:00
|
|
|
printf "Creating %s\n" "${filename}"
|
|
|
|
git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename"
|
2018-04-29 10:00:22 +02:00
|
|
|
git add "${PATCHESDIR}/$filename"
|
2019-07-25 04:07:31 +02:00
|
|
|
i=$((i+1))
|
2018-04-29 10:00:22 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf "${TMP_REPODIR}"
|
|
|
|
|
|
|
|
printf "finished\n"
|
|
|
|
|