@ 261104.1

260701.3.1 · 160d00f8fe033f23000ab2a2ce534081454a4035

Add a little more automation for the release

Add an awk script for automatically updating the help text in README.md

reading declarations

Changes to scripts/update-help.awk. All files

scripts/update-help.awk

new file mode 100755@@ -0,0 +1,41 @@+#!/usr/bin/gawk -f++BEGIN {+  inSection = 0+  inBlock = 0+}+++/Command-line options/ { inSection=1 }++inSection && /^```/ {+  inBlock=1+  inSection=0+  # print the starting fence then move to next line+  print+  next+}++inBlock && /^```/ {+  cmd="cargo run --release --quiet -- -h"+  # Output the results of fd -h+  u=0+  while (cmd | getline line) {+    # Skip everything before the usage line+    if (line ~ /^Usage/) {+      u=1;+    }+    if (u) {+      print line+    }+  }+  status = close(cmd)+  if (status) {+    print "failed to generate help output" > "/dev/stderr"+    exit 1+  }+  inBlock = 0+}++!inBlock+