Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
12345678910111213# Sourced wherever pac's output is read: every frontend prints its answer# as a "packages (N):" line and N rows under it, each indented two spaces.
rows() { # <pac output>: the answer's rows, unindented awk '/^packages \(/ {s = 1; next} s && /^ / {print substr($0, 3); next} s {exit}' "$1"}
# whether the block holds every row its header counts: a line that is no# row ends the block early, and the rows after it would go unjudgedwhole() { # <pac output> [ "$(sed -n 's/^packages (\([0-9]*\)):$/\1/p' "$1")" = "$(rows "$1" | wc -l)" ]}