-
Notifications
You must be signed in to change notification settings - Fork 0
/
getCommandHelp
executable file
·60 lines (47 loc) · 1.24 KB
/
getCommandHelp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
CLI_PAGE="docs/content/cli/_index.md"
echo "---
title: "CLI"
weight: 4
---
This page lists documentation for the CLI.
" > _index.md
BACKYCOMMAND="go run backy.go"
echo "## Backy " >> _index.md
echo " " >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} -h >> _index.md"
echo "\`\`\`" >> _index.md
echo " " >> _index.md
echo "# Subcommands" >> _index.md
echo "" >> _index.md
echo "## backup" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} backup -h >> _index.md"
echo "\`\`\`" >> _index.md
echo "" >> _index.md
echo "## cron" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} cron -h >> _index.md"
echo "\`\`\`" >> _index.md
echo "" >> _index.md
echo "## exec" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} exec -h >> _index.md"
echo "\`\`\`" >> _index.md
echo "" >> _index.md
echo "## version" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} version -h >> _index.md"
echo "\`\`\`" >> _index.md
echo "" >> _index.md
echo "## list" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} list -h >> _index.md"
echo "\`\`\`" >> _index.md
mv _index.md "$CLI_PAGE"