Tags: aaronhurt/zfs-replicate
Tags
improve logging and add tests (#47) Previous logging was always sent to stdout in functions, this prevented some functions like snapList from logging the commands sent as these functions printed return values used by other functions. To fix this, all user facing logging has been switched to stderr which is not picked up by calling functions. This commit also adds tests for the --status/-s and --help/-h options which includes testing of the sortLogs function.
fix option parsing, add missing help (#45) In light of the discussion in #44, option parsing needs to be more strict. We shouldn't allow an orphaned config at the end of a line that looks like an option to another argument. This commit ensures that the config is either passed FIRST, or via the -c/--config option. It also does full argument validation before calling showStatus or showHelp.
Port scripts to strict POSIX implementations (#41) This commit refactors scripts to pure POSIX implementations. * Testing was done in `dash` on macOS as well as FreeBSD's `sh` shell. * Test cases in `test/*.sh` have been significantly improved. * This is the current recommended version of this script.