Pārlūkot izejas kodu

Update and add function docstrings

Alois Mahdal 7 gadus atpakaļ
vecāks
revīzija
1c48ab443c
3 mainītis faili ar 36 papildinājumiem un 3 dzēšanām
  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 Parādīt failu

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

+ 27
- 0
src/include/release.sh Parādīt failu

@@ -127,6 +127,12 @@ _release_msg() {
127 127
 }
128 128
 
129 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 136
     local rlevel=$1
131 137
     local nextver   # after the bump
132 138
     _relck git_present
@@ -143,6 +149,9 @@ _vbump() {
143 149
 }
144 150
 
145 151
 _vbump_gitmsg() {
152
+    #
153
+    # Compose git message template for 'Bump version' commit
154
+    #
146 155
     echo "Bump version"
147 156
     echo ""
148 157
     echo "Overview of changes:"
@@ -156,25 +165,43 @@ _vbump_gitmsg() {
156 165
 }
157 166
 
158 167
 release_x() {
168
+    #
169
+    # Perform release on X level
170
+    #
159 171
     _release x
160 172
 }
161 173
 
162 174
 release_y() {
175
+    #
176
+    # Perform release on Y level
177
+    #
163 178
     _release y
164 179
 }
165 180
 
166 181
 release_z() {
182
+    #
183
+    # Perform release on Z level
184
+    #
167 185
     _release z
168 186
 }
169 187
 
170 188
 vbump_x() {
189
+    #
190
+    # Perform version bump on X level
191
+    #
171 192
     _vbump x
172 193
 }
173 194
 
174 195
 vbump_y() {
196
+    #
197
+    # Perform version bump on Y level
198
+    #
175 199
     _vbump y
176 200
 }
177 201
 
178 202
 vbump_z() {
203
+    #
204
+    # Perform version bump on Z level
205
+    #
179 206
     _vbump z
180 207
 }

+ 3
- 0
src/make.skel Parādīt failu

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