summaryrefslogtreecommitdiff
path: root/backomp
diff options
context:
space:
mode:
Diffstat (limited to 'backomp')
-rwxr-xr-xbackomp16
1 files changed, 10 insertions, 6 deletions
diff --git a/backomp b/backomp
index ae9bbce..13a4b3c 100755
--- a/backomp
+++ b/backomp
@@ -3,7 +3,9 @@
set -e
! read -rd '' FILTER_AWK <<'EOF'
-function flr(n, s) { return int(n / s) * s }
+function flr(n, s) {
+ return int(n / s) * s
+}
BEGIN {
len = split("h d w m", arr)
@@ -31,12 +33,13 @@ BEGIN {
for (i = 1; i <= n_buckets; ++i) {
b = buckets[i]
- if (skip = (repl[b] && bt[b] == last[b, b])) {
+ if (repl[b] && bt[b] == last[b, b]) {
for (j = 1; j < i; ++j) {
- skip = (bt[buckets[j]] != last[b, buckets[j]])
- if (!skip) break
+ if (bt[buckets[j]] == last[b, buckets[j]])
+ break
}
- if (skip) next
+ if (j == i)
+ next
}
if ((b, bt[b]) in bkeep || ret[b] == "*" || bc[b]++ < ret[b])
@@ -52,7 +55,8 @@ END {
++keep[bkeep[i]]
asorti(keep)
- for (i in keep) print keep[i]
+ for (i in keep)
+ print keep[i]
}
EOF