Browse Source

Update and add function docstrings

Alois Mahdal 7 years ago
parent
commit
1c48ab443c
3 changed files with 36 additions and 3 deletions
  1. 6
    3
      src/include/build.sh
  2. 27
    0
      src/include/release.sh
  3. 3
    0
      src/make.skel

+ 6
- 3
src/include/build.sh View File

6
 
6
 
7
 _build1() {
7
 _build1() {
8
     #
8
     #
9
-    # Process one skeleton
9
+    # Process one skeleton $1 of type $3 (or guessed) to path $2
10
     #
10
     #
11
     local srcpath=$1
11
     local srcpath=$1
12
     local dstpath=$2
12
     local dstpath=$2
21
 
21
 
22
 _build1_ftype() {
22
 _build1_ftype() {
23
     #
23
     #
24
-    # Build a file of type $1
24
+    # Build a file of type $1; fom stdin to stdout
25
     #
25
     #
26
     local ftype=$1
26
     local ftype=$1
27
     case $ftype in
27
     case $ftype in
59
 
59
 
60
 _expand_tokens() {
60
 _expand_tokens() {
61
     #
61
     #
62
-    # Expand tokens from sections $@
62
+    # Read stdin, expanding tokens from sections $@
63
     #
63
     #
64
     local script=$(mktemp --tmpdir mkit-tmp.XXXXXXXXXX)
64
     local script=$(mktemp --tmpdir mkit-tmp.XXXXXXXXXX)
65
     local section varname varvalue
65
     local section varname varvalue
123
 }
123
 }
124
 
124
 
125
 build_manpages() {
125
 build_manpages() {
126
+    #
127
+    # Build manpages using ronn
128
+    #
126
     local manfile mdfile
129
     local manfile mdfile
127
     if command -v ronn >/dev/null;
130
     if command -v ronn >/dev/null;
128
     then
131
     then

+ 27
- 0
src/include/release.sh View File

127
 }
127
 }
128
 
128
 
129
 _vbump() {
129
 _vbump() {
130
+    #
131
+    # Do version bump at level $1
132
+    #
133
+    # Perform checks, compute new version, update mkit.ini and initiate
134
+    # 'Bump version' commit with changelog template.
135
+    #
130
     local rlevel=$1
136
     local rlevel=$1
131
     local nextver   # after the bump
137
     local nextver   # after the bump
132
     _relck git_present
138
     _relck git_present
143
 }
149
 }
144
 
150
 
145
 _vbump_gitmsg() {
151
 _vbump_gitmsg() {
152
+    #
153
+    # Compose git message template for 'Bump version' commit
154
+    #
146
     echo "Bump version"
155
     echo "Bump version"
147
     echo ""
156
     echo ""
148
     echo "Overview of changes:"
157
     echo "Overview of changes:"
156
 }
165
 }
157
 
166
 
158
 release_x() {
167
 release_x() {
168
+    #
169
+    # Perform release on X level
170
+    #
159
     _release x
171
     _release x
160
 }
172
 }
161
 
173
 
162
 release_y() {
174
 release_y() {
175
+    #
176
+    # Perform release on Y level
177
+    #
163
     _release y
178
     _release y
164
 }
179
 }
165
 
180
 
166
 release_z() {
181
 release_z() {
182
+    #
183
+    # Perform release on Z level
184
+    #
167
     _release z
185
     _release z
168
 }
186
 }
169
 
187
 
170
 vbump_x() {
188
 vbump_x() {
189
+    #
190
+    # Perform version bump on X level
191
+    #
171
     _vbump x
192
     _vbump x
172
 }
193
 }
173
 
194
 
174
 vbump_y() {
195
 vbump_y() {
196
+    #
197
+    # Perform version bump on Y level
198
+    #
175
     _vbump y
199
     _vbump y
176
 }
200
 }
177
 
201
 
178
 vbump_z() {
202
 vbump_z() {
203
+    #
204
+    # Perform version bump on Z level
205
+    #
179
     _vbump z
206
     _vbump z
180
 }
207
 }

+ 3
- 0
src/make.skel View File

4
 # See LICENSE file for copyright and license details.
4
 # See LICENSE file for copyright and license details.
5
 
5
 
6
 die() {
6
 die() {
7
+    #
8
+    # Poor man's die() (mkit.sh has better)
9
+    #
7
     echo "$@" && exit 9
10
     echo "$@" && exit 9
8
 }
11
 }
9
 
12