mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Merge pull request #9564 from neheb/hap
haproxy: Get rid of bashisms from get-latest-patches.sh
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
CLONEURL=http://git.haproxy.org/git/haproxy-2.0.git
|
CLONEURL=https://git.haproxy.org/git/haproxy-2.0.git
|
||||||
BASE_TAG=v2.0.3
|
BASE_TAG=v2.0.3
|
||||||
TMP_REPODIR=tmprepo
|
TMP_REPODIR=tmprepo
|
||||||
PATCHESDIR=patches
|
PATCHESDIR=patches
|
||||||
@@ -15,10 +15,10 @@ find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \;
|
|||||||
i=0
|
i=0
|
||||||
for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
|
for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
|
||||||
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"
|
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"
|
||||||
printf "Creating ${filename}\n"
|
printf "Creating %s\n" "${filename}"
|
||||||
git -C "${TMP_REPODIR}" show $cid > "${PATCHESDIR}/$filename"
|
git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename"
|
||||||
git add "${PATCHESDIR}/$filename"
|
git add "${PATCHESDIR}/$filename"
|
||||||
let i++
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf "${TMP_REPODIR}"
|
rm -rf "${TMP_REPODIR}"
|
||||||
|
|||||||
Reference in New Issue
Block a user