Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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=$(