diff options
author | Aikar <[email protected]> | 2018-10-24 01:24:17 -0400 |
---|---|---|
committer | Aikar <[email protected]> | 2018-10-24 01:24:17 -0400 |
commit | d1ebaaf82be7edc3688bfc3b7ed241f98bb662cf (patch) | |
tree | 13622723e6a5be6e7fb28bf9bc430931c7b218e1 /scripts | |
parent | 9212632516c535dc3764329761aff82551334644 (diff) | |
download | Paper-d1ebaaf82be7edc3688bfc3b7ed241f98bb662cf.tar.gz Paper-d1ebaaf82be7edc3688bfc3b7ed241f98bb662cf.zip |
[CI-SKIP] use cross platform strategy for sed -i
BSD sed can DIAF.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rebuildPatches.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh index 0cb4933de7..baecc67ea0 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 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0/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 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0/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)") |