File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script generates all the openSeaChest man pages.
4+
5+ if ! command -v help2man > /dev/null 2>&1
6+ then
7+ echo " You must install help2man to generate man pages"
8+ fi
9+
10+ if [ " $# " -lt 1 ]; then
11+ echo " You must provide a path to the openSeaChest executables"
12+ fi
13+
14+ exeDir=" $1 "
15+
16+ generatorDir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
17+
18+ # this is a list of ALL of the tools. This is used as a "Base" to generate all of the docs for these tools
19+ openSeaChest_doc_list=(" openSeaChest_Basics" " openSeaChest_Configure" " openSeaChest_Erase" " openSeaChest_Firmware" " openSeaChest_Format" " openSeaChest_GenericTests" " openSeaChest_Info" " openSeaChest_Logs" " openSeaChest_NVMe" " openSeaChest_PassthroughTest" " openSeaChest_PowerControl" " openSeaChest_Reservations" " openSeaChest_Security" " openSeaChest_SMART" " openSeaChest_ZBD" )
20+
21+ for tool in " ${openSeaChest_doc_list[@]} " ; do
22+ echo " -------------$tool -----------"
23+ if [ -z " $tool " ]; then
24+ continue
25+ fi
26+
27+ textDoc=" $generatorDir /man/man8/$tool .8"
28+
29+ if [ -f " $textDoc " ]; then
30+ # remove the file if it already exists so we get a new clean one
31+ rm -f " $textDoc "
32+ fi
33+
34+ # run help2man for each utility
35+ help2man -s8 -N -n=" drive utilities" -o " $textDoc " " $exeDir /$tool * --noBanner"
36+
37+ done
You can’t perform that action at this time.
0 commit comments