From 5092f680e82094217fa7da3c8538e244afa648e2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 24 Jul 2019 19:07:31 -0700 Subject: [PATCH] haproxy: Get rid of bashisms from get-latest-patches.sh Plus some other shellcheck cleanups. Signed-off-by: Rosen Penev --- net/haproxy/get-latest-patches.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/haproxy/get-latest-patches.sh b/net/haproxy/get-latest-patches.sh index f3c59beeb7..2e2402b66f 100755 --- a/net/haproxy/get-latest-patches.sh +++ b/net/haproxy/get-latest-patches.sh @@ -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 TMP_REPODIR=tmprepo PATCHESDIR=patches @@ -15,10 +15,10 @@ 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 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" - git -C "${TMP_REPODIR}" show $cid > "${PATCHESDIR}/$filename" + printf "Creating %s\n" "${filename}" + git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename" git add "${PATCHESDIR}/$filename" - let i++ + i=$((i+1)) done rm -rf "${TMP_REPODIR}" -- 2.30.2