Starting my study of the `grub-*` commands...
There's a shellscript `grub-reboot` which parses commandline args with a couple util functions, verifies that a menu entry was specified, fills in a missing bootdir, verifies results from `grub-probe`, & invokes `grub-editenv` once or thrice.
Another shellscript `grub-set-default` works extremely similarly.
`grub-script-check` zeroes out several properties, performs some OS-specific init, parses commandline flags, ...
1/?