-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-ref.sh
executable file
·101 lines (82 loc) · 1.69 KB
/
build-ref.sh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
clean() {
sed 's/^...../ /'
}
build_hub() {
echo -e '# shed-hub\n'
../shed-hub -h | clean
echo
echo -e '# Commands\n'
for cmd in build events info inspect login logout pull push query search version
do
echo -e "## $cmd\n"
../shed-hub $cmd -h | clean
echo
done
} > reference-hub.md
build_image() {
echo -e '# shed-image\n'
../shed-image -h | clean
echo
echo -e '# Commands\n'
for cmd in build commit history images import load purge rm save tag
do
echo -e "## $cmd\n"
../shed-image $cmd -h | clean
echo
done
} > reference-image.md
build_container() {
echo -e '# shed-container\n'
../shed-container -h | clean
echo
echo -e '# General commands\n'
for cmd in build cp create diff export links port ps rename rm status
do
echo -e "## $cmd\n"
../shed-container $cmd -h | clean
echo
done
echo -e '# Runtime commands\n'
for cmd in attach exec kill logs pause restart run ship start stats stop top update unpause wait
do
echo -e "## $cmd\n"
../shed-container $cmd -h | clean
echo
done
} > reference-container.md
build_volume() {
echo -e '# shed-volume\n'
../shed-volume -h | clean
echo
echo -e '# Commands\n'
for cmd in create inspect ls purge rm
do
echo -e "## $cmd\n"
../shed-volume $cmd -h | clean
echo
done
} > reference-volume.md
build_network() {
echo -e '# shed-network\n'
../shed-network -h | clean
echo
echo -e '# Commands\n'
for cmd in connect create disconnect inspect ls rm
do
echo -e "## $cmd\n"
../shed-network $cmd -h | clean
echo
done
} > reference-network.md
if (( $# == 0 ))
then
build_hub
build_image
build_container
build_volume
build_network
else
for r; do build_$r; done
fi
exit