diff --git a/userspace/make-man.sh b/userspace/make-man.sh new file mode 100755 index 00000000..1deb9415 --- /dev/null +++ b/userspace/make-man.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +function get_option_help +{ + local verbose=$1 + ./marsadm --verbose=$verbose --help |\ + awk '/^/ { x=0; }; { if(x) print $0; }; /^/ { x=1; };' |\ + sed 's/\(--[-a-z_]\+\)/\\fB\1\\fR/' + +} + +function get_cmd_help +{ + local verbose=$1 + ./marsadm --verbose=$verbose --help |\ + awk '/^/ { x=0; }; { if(x) print $0; }; /^/ { x=1; };' |\ + sed 's/\(^ *[-a-z_]\+$\)/\\fB\1\\fR/' +} + +( + cat <} [ | all | {arg}] +.br +.B marsadm {} view[-] [ | all] +.br + +.SH DESCRIPTION +MARS is a kernel-level asynchronous replication system for block devices. +It is tailored for long-distance replication and through network +bottlenecks. +By default, it works asynchronously (in contrast to DRBD). +.br +More infomation on concepts and differences to DRDB can be found at +https://github.com/schoebel/mars/blob/master/docu/MARS_LinuxTag2014.pdf?raw=true + +.SH OPTIONS +EOF + +get_option_help 0 + +cat </\\fR/g' |\ + sed 's/-/\\-/g' |\ + tee marsadm.8