From caddaa85a69227684c17807e07f48c430bbff248 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 24 Oct 2018 01:24:17 -0400 Subject: [PATCH] [CI-SKIP] use cross platform strategy for sed -i BSD sed can DIAF. --- scripts/rebuildPatches.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh index a4f420366e..4db5752d91 100755 --- a/scripts/rebuildPatches.sh +++ b/scripts/rebuildPatches.sh @@ -12,8 +12,9 @@ echo "Rebuilding patch files from current fork state..." function cleanupPatches { cd "$1" for patch in *.patch; do - sed -Ei 's/index [a-f0-9]+\.\.[a-f0-9]+/index 7ac07ac07ac0..7ac07ac07ac0/g' "$patch" - sed -Ei 's/^From [a-f0-9]{32,}/From 0000000000000000000000000000000000000000/g' "$patch" + sed -Ei.bak 's/index [a-f0-9]+\.\.[a-f0-9]+/index 7ac07ac07ac0..7ac07ac07ac0/g' "$patch" + sed -Ei.bak 's/^From [a-f0-9]{32,}/From 0000000000000000000000000000000000000000/g' "$patch" + rm "$patch.bak" $gitcmd add -A $patch gitver=$(tail -n 2 "$patch" | grep -ve "^$" | tail -n 1) diffs=$($gitcmd diff --staged "$patch" | grep --color=none -E "^(\+|\-)" | grep --color=none -Ev "(From [a-f0-9]{32,}|\-\-\- a|\+\+\+ b|^.index)")