Use POSIX sed (#403)

This commit is contained in:
Julien Cretin
2021-11-04 12:13:16 +01:00
committed by GitHub
parent 330fa12d1a
commit 33e0d6bb74

View File

@@ -20,7 +20,7 @@ commit() {
} }
get_root() { get_root() {
git ls-tree HEAD:third_party | sed -n 's/^.* \([^ ]\+\)\ttock$/\1/p' git ls-tree HEAD:third_party | sed -En 's/^.* ([^ ]+)\ttock$/\1/p'
} }
get_head() { get_head() {
@@ -105,7 +105,7 @@ save() {
rm ../../patches/tock/*.patch rm ../../patches/tock/*.patch
for file in $(git format-patch "${root}"); do for file in $(git format-patch "${root}"); do
sed -n '/^diff/,$p' "${file}" \ sed -n '/^diff/,$p' "${file}" \
| head -n-3 > "../../patches/tock/${file#*-}" | sed '/^-- $/,$d' > "../../patches/tock/${file#*-}"
done done
git clean -qfxd git clean -qfxd
top="$(get_head)" top="$(get_head)"