Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-25 14:10:41 +0200
committerErich Eckner <git@eckner.net>2019-06-25 14:10:41 +0200
commit6d0ae6a9c27c0f33dc5833652fdffb300bea0fb9 (patch)
tree19d0cf5de37608bfd28a6c5ce14ae440aec14fbd /bin
parentd7b4746ce14b0b448d56acfe51a3be8719113b3e (diff)
bin/bisect-database-dumps: also bisect for "when did x vanish"
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bisect-database-dumps15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/bisect-database-dumps b/bin/bisect-database-dumps
index deb88f8..7ccbe16 100755
--- a/bin/bisect-database-dumps
+++ b/bin/bisect-database-dumps
@@ -13,7 +13,19 @@ has=$(
)
if ! xzgrep -q "$@" "${has}"; then
- >&2 printf 'cannot find "%s" in the latest dump\n' "$*"
+ >&2 printf 'cannot find "%s" in the latest dump - swapping directions\n' "$*"
+ dumps=$(
+ printf '%s\n' "${dumps}" | \
+ tac
+ )
+ has=$(
+ printf '%s\n' "$dumps" | \
+ tail -n1
+ )
+ if ! xzgrep -q "$@" "${has}"; then
+ >&2 printf 'cannot find "%s" in the earliest dump either - swapping directions did not help\n' "$*"
+ exit 1
+ fi
fi
has_not=$(
@@ -23,6 +35,7 @@ has_not=$(
if xzgrep -q "$@" "${has_not}"; then
>&2 printf 'first dump does also have "%s"\n' "$*"
+ exit 1
fi
count=$(