carlos / todomvc-bakeoff Public

Clone
git clone https://amadan.net/carlos/todomvc-bakeoff

Plain git — no account needed to clone.

Download

Download this file

1#!/usr/bin/env bash
2# Regenerates patches/2-tep-bakeoff.patch from the edited tep copy in
3# .cache/x86/tep (maintainer tool; the build only applies patches).
4set -euo pipefail
5cd "$(dirname "$0")/.."
6src=${TEP_SRC:-$HOME/.local/share/bakeoff-toolchains/spinel-src/tep}
7base=$(mktemp -d -p "${TMPDIR:-/tmp}")
8trap 'rm -rf "$base"' EXIT
9mkdir -p "$base/a"
10cp -a "$src/." "$base/a/"
11rm -rf "$base/a/.git"
12patch -s -p1 -d "$base/a" < patches/1-tep-carlos.patch
13cp -a .cache/x86/tep "$base/b"
14find "$base/b" -name '*.o' -delete
15rm -f "$base/b/.patched"
16(cd "$base" && diff -ruN a b || true) | sed -E 's#^(---|\+\+\+) ([^\t]*)\t.*#\1 \2#; /^diff -ruN /d' > patches/2-tep-bakeoff.patch
17