mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 09:06:40 +01:00
[CI-SKIP] use cross platform strategy for sed -i
BSD sed can DIAF.
This commit is contained in:
parent
9212632516
commit
d1ebaaf82b
1 changed files with 3 additions and 2 deletions
|
@ -12,8 +12,9 @@ echo "Rebuilding patch files from current fork state..."
|
||||||
function cleanupPatches {
|
function cleanupPatches {
|
||||||
cd "$1"
|
cd "$1"
|
||||||
for patch in *.patch; do
|
for patch in *.patch; do
|
||||||
sed -Ei 's/index [a-f0-9]+\.\.[a-f0-9]+/index 7ac07ac07ac0..7ac07ac07ac0/g' "$patch"
|
sed -Ei.bak 's/index [a-f0-9]+\.\.[a-f0-9]+/index 7ac07ac07ac0..7ac07ac07ac0/g' "$patch"
|
||||||
sed -Ei 's/^From [a-f0-9]{32,}/From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0/g' "$patch"
|
sed -Ei.bak 's/^From [a-f0-9]{32,}/From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0/g' "$patch"
|
||||||
|
rm "$patch.bak"
|
||||||
$gitcmd add -A $patch
|
$gitcmd add -A $patch
|
||||||
gitver=$(tail -n 2 "$patch" | grep -ve "^$" | tail -n 1)
|
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)")
|
diffs=$($gitcmd diff --staged "$patch" | grep --color=none -E "^(\+|\-)" | grep --color=none -Ev "(From [a-f0-9]{32,}|\-\-\- a|\+\+\+ b|^.index)")
|
||||||
|
|
Loading…
Reference in a new issue