mars/docu/make-help.sh

19 lines
625 B
Bash
Raw Normal View History

2018-04-23 13:25:32 +00:00
#!/bin/bash
football_dir="${football_dir:-../football}"
function make_latex_include
{
local cmd="$1"
echo '\begin{verbatim}'
eval "$cmd" | sed 's/\\/\\\\/g'
echo '\end{verbatim}'
}
make_latex_include "../userspace/marsadm --help" > marsadm.help
make_latex_include "(cd $football_dir/ && ./football.sh --help)" > football.help
make_latex_include "(cd $football_dir/ && ./football.sh --help --verbose)" > football-verbose.help
make_latex_include "(cd $football_dir/ && ./screener.sh --help)" > screener.help
make_latex_include "(cd $football_dir/ && ./screener.sh --help --verbose)" > screener-verbose.help