Volunteers to review a shell wrapper using modern bash-4.x features?


Howdy –

I have an outstanding PR (adding an expression and NixOS module for bees, an extent-layer btrfs deduplicator) which @Infinisil was kind enough to review, but for a shell wrapper contained therein.

The script in question is at https://github.com/NixOS/nixpkgs/pull/48423/files#diff-e8e78f122291b55608e83be5b5cce555; it intends to perform the same function as the upstream tool at https://github.com/Zygo/bees/blob/14ccf88050ff83ece75f633245110f3deb8693bc/scripts/beesd.in, but without requiring the UUID of the filesystem to be deduplicated to be hardcoded in the configuration (which is quite thoroughly baked into the original).

Upstream bees has indicated that they could possibly be amenable to merging a future version of my wrapper (for inclusion in a future version of bees) if it’s extended to be backwards compatible with existing config files – I might pursue that approach, but it’d be good to get the current version of bees available in Nix even as-is; and requiring configuration.nix to know about filesystem UUIDs (as would be necessary to generate config files for use by the original upstream wrapper without needing to perform runtime inspection steps) is pretty much unacceptable on its face.

Would anyone who considers themselves handy enough with bash to review some code that’s fairly aggressive about leveraging modern language features where doing so aids correctness be available to review?

Many thanks,
– Charles


Apparently, I can’t mark a topic solved without at least one response – but @7c6f434c has been kind enough to go through the code in question and flag a set of issues for cleanup.

It’s not clear that this is mergeable even after a first pass at those, but it’s certainly received enough attention that there’s no need to try to get more eyes here. Many thanks!

(Edit: Huh; apparently, that Discourse plugin is only active in the Help section; apologies again for the noise).