Browse Source

Update MKit to v0.0.29

Alois Mahdal 6 years ago
parent
commit
a5d65a3367
5 changed files with 117 additions and 118 deletions
  1. 60
    9
      utils/mkit/include/build.sh
  2. 53
    62
      utils/mkit/include/facts.sh
  3. 0
    34
      utils/mkit/include/mkit.sh
  4. 1
    1
      utils/mkit/include/vars.sh
  5. 3
    12
      utils/mkit/stub

+ 60
- 9
utils/mkit/include/build.sh View File

17
     test -n "$ftype"    || ftype=$(__guess_ftype "$dstpath")
17
     test -n "$ftype"    || ftype=$(__guess_ftype "$dstpath")
18
     debug_var srcpath dstpath ftype
18
     debug_var srcpath dstpath ftype
19
     <"$srcpath" __build1_ftype "$ftype" >"$dstpath"
19
     <"$srcpath" __build1_ftype "$ftype" >"$dstpath"
20
-    rec_built "$dstpath"
20
+    __rec_built "$dstpath"
21
 }
21
 }
22
 
22
 
23
 __build1_ftype() {
23
 __build1_ftype() {
59
         echo "s|__MKIT_PROJ_TAGLINE__|$(ini 1value project:tagline | __qfs)|g;"
59
         echo "s|__MKIT_PROJ_TAGLINE__|$(ini 1value project:tagline | __qfs)|g;"
60
         echo "s|__MKIT_PROJ_MAINTAINER__|$(ini 1value project:maintainer | __qfs)|g;"
60
         echo "s|__MKIT_PROJ_MAINTAINER__|$(ini 1value project:maintainer | __qfs)|g;"
61
         echo "s|__MKIT_PROJ_VCS_BROWSER__|$(ini 1value project:vcs_browser | __qfs)|g;"
61
         echo "s|__MKIT_PROJ_VCS_BROWSER__|$(ini 1value project:vcs_browser | __qfs)|g;"
62
-        echo "s|__MKIT_PROJ_GIT_LASTHASH__|$(git_lasthash | __qfs)|g;"
63
-        echo "s|__MKIT_PROJ_VERSION__|$(semver | __qfs)|g;"
62
+        echo "s|__MKIT_PROJ_GIT_LASTHASH__|$(__cached git_lasthash | __qfs)|g;"
63
+        echo "s|__MKIT_PROJ_VERSION__|$(__cached semver | __qfs)|g;"
64
         echo "s|__MKIT_SELF_VERSION__|$MKIT_VERSION|g;"
64
         echo "s|__MKIT_SELF_VERSION__|$MKIT_VERSION|g;"
65
     } >> "$script"
65
     } >> "$script"
66
     sed -f "$script" || die "__expand_tokens failed"
66
     sed -f "$script" || die "__expand_tokens failed"
87
     '
87
     '
88
 }
88
 }
89
 
89
 
90
+__cached() {
91
+    #
92
+    # Cached value $1 of function $1()
93
+    #
94
+    # In order to support git-less builds, some values might be cached
95
+    # in $MKIT_LOCAL.  This function gets file $1 from that cache (cache
96
+    # hit) or re-creates it (cache miss), but prints its body in either
97
+    # case.
98
+    #
99
+    # The command to re-create file is the same as the key (ie. no
100
+    # arguments).
101
+    #
102
+    local name=$1
103
+    __local_get "$name" && return 0
104
+    "$name" | __local_putb "$name"
105
+    __local_get "$name"
106
+}
107
+
108
+__local_putb() {
109
+    #
110
+    # Make file $1 in $MKIT_LOCAL from stdin and mark as built
111
+    #
112
+    local fpath=$1
113
+    __local_put "$fpath" && __rec_built "$MKIT_LOCAL/$fpath"
114
+}
115
+
116
+__local_put() {
117
+    #
118
+    # Make file $1 in $MKIT_LOCAL from stdin
119
+    #
120
+    local fpath="$MKIT_LOCAL/$1"
121
+    { mkdir -p "${fpath%/*}" && cat >"$fpath"; } \
122
+     || die "cannot write to local cache: $fpath"
123
+}
124
+
125
+__local_get() {
126
+    #
127
+    # Read file $1 in $MKIT_LOCAL
128
+    #
129
+    local fpath="$MKIT_LOCAL/$1"
130
+    cat "$fpath" 2>/dev/null
131
+}
132
+
133
+__rec_built() {
134
+    #
135
+    # Record file $1 for deletion on `clean`
136
+    #
137
+    local file=$1
138
+    mkdir -p "$MKIT_LOCAL"
139
+    echo "$file" >> "$MKIT_LOCAL/built.lst"
140
+}
141
+
90
 _mkit_data() {
142
 _mkit_data() {
91
     #
143
     #
92
     # Build sampler showing all token values
144
     # Build sampler showing all token values
125
     # Add meat to all skeletons
177
     # Add meat to all skeletons
126
     #
178
     #
127
     local srcpath   # each source path
179
     local srcpath   # each source path
128
-    semver >/dev/null
129
     find . -type f -name '*.skel' \
180
     find . -type f -name '*.skel' \
130
      | while read -r srcpath; do
181
      | while read -r srcpath; do
131
            __build1 "$srcpath"
182
            __build1 "$srcpath"
153
     local debian_skel   # 'debian' folder skeleton
204
     local debian_skel   # 'debian' folder skeleton
154
     local dfsrc         # each source file from ^^
205
     local dfsrc         # each source file from ^^
155
     local dftgt         # each built packaging file
206
     local dftgt         # each built packaging file
156
-    version=$(semver)
207
+    version=$(__cached semver)
157
 
208
 
158
     # tarball - we should already have by means of 'dist'
209
     # tarball - we should already have by means of 'dist'
159
     #
210
     #
160
     mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
211
     mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
161
        "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
212
        "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
162
      || die "could not rename tarball"
213
      || die "could not rename tarball"
163
-    rec_built "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz"
214
+    __rec_built "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz"
164
 
215
 
165
     # read content of each mandatory file from debian_skel
216
     # read content of each mandatory file from debian_skel
166
     #
217
     #
174
             mkdir -p "$(dirname "$dftgt")"
225
             mkdir -p "$(dirname "$dftgt")"
175
             __build1 "$dfsrc" "$dftgt" debstuff
226
             __build1 "$dfsrc" "$dftgt" debstuff
176
         done
227
         done
177
-    rec_built debian
228
+    __rec_built debian
178
 }
229
 }
179
 
230
 
180
 dist() {
231
 dist() {
192
     git_lasthash=$(git_lasthash)
243
     git_lasthash=$(git_lasthash)
193
     mkdir -p "$dirname"
244
     mkdir -p "$dirname"
194
     ini values "dist:tarball" | xargs -I DIST_ITEM cp -R DIST_ITEM "$dirname"
245
     ini values "dist:tarball" | xargs -I DIST_ITEM cp -R DIST_ITEM "$dirname"
195
-    update_version "$version" "$dirname/mkit.ini"
196
     mkdir -p "$dirname/.mkit"
246
     mkdir -p "$dirname/.mkit"
247
+    echo -n "$version" > "$dirname/.mkit/semver"
197
     echo -n "$git_lasthash" > "$dirname/.mkit/git_lasthash"
248
     echo -n "$git_lasthash" > "$dirname/.mkit/git_lasthash"
198
     tar -cf "$dirname.tar" "$dirname"
249
     tar -cf "$dirname.tar" "$dirname"
199
     gzip -f "$dirname.tar"      # see above FIXME
250
     gzip -f "$dirname.tar"      # see above FIXME
200
-    rec_built "$dirname.tar.gz"
251
+    __rec_built "$dirname.tar.gz"
201
     rm -rf "$dirname"
252
     rm -rf "$dirname"
202
 }
253
 }
203
 
254
 

+ 53
- 62
utils/mkit/include/facts.sh View File

85
     #
85
     #
86
     # Show last commit hash (with .dirty suffix if needed)
86
     # Show last commit hash (with .dirty suffix if needed)
87
     #
87
     #
88
-    # If outside git repo, get it from .mkit/git_lasthash, which
89
-    # should have been put there by dist target.  (I.e., this won't
90
-    # work if you got outside the git repo in other way than dist
91
-    # target, but that's actually expected.)
88
+    # We can't do it outside git repo (or without git) but we should
89
+    # not be asked to; targets that don't require git should make use
90
+    # of cache built by dist target.
92
     #
91
     #
93
     local last_hash     # last commit hash
92
     local last_hash     # last commit hash
94
-    if git_present; then    # we are in git repo
95
-        last_hash=$(git rev-parse HEAD)
96
-        echo -n "$last_hash"
97
-        git_bool dirty && echo -n ".dirty"
98
-    else    # we are outside (eg. distributor's build dir')
99
-        grep . .mkit/git_lasthash || {
100
-            echo UNKNOWN
101
-            warn "malformed source, could not determine git hash"
102
-        }
103
-    fi
93
+    git_present || {
94
+        echo UNKNOWN_HASH
95
+        warn "no git present; could not determine last hash"
96
+        return 3
97
+    }
98
+    last_hash=$(git rev-parse HEAD)
99
+    echo -n "$last_hash"
100
+    git_bool dirty && echo -n ".dirty"
104
 }
101
 }
105
 
102
 
106
 semver() {
103
 semver() {
107
     #
104
     #
108
-    # Build semver version string with build metadata
105
+    # Build proper SemVer version string
109
     #
106
     #
110
     # Build version string from available info using following
107
     # Build version string from available info using following
111
     # logic:
108
     # logic:
112
     #
109
     #
113
-    #  1. use project.version (from mkit.ini)
114
-    #  2. if we are in git, override the version with last tag
115
-    #  3. if set, add project:prerl (from mkit.ini) as pre-release ID
110
+    #  1. Use version from last git tag (or mkit.ini if there is no
111
+    #     tag, which is possible on new project)
112
+    #  2. if set, add project:prerl (from mkit.ini) as pre-release ID
116
     #     (afer dash)
113
     #     (afer dash)
117
-    #  4. if we are at a later commit than the last tag, add branch
114
+    #  3. if we are at a later commit than the last tag, add branch
118
     #     name and commit sha1 to build metadata (after plus sign)
115
     #     name and commit sha1 to build metadata (after plus sign)
119
-    #  5. if the tree is "dirty", i.e. has uncommited changes,
116
+    #  4. if the tree is "dirty", i.e. has uncommited changes,
120
     #     add "dirty" to build metadata
117
     #     add "dirty" to build metadata
121
     #
118
     #
122
     # The version is compatible with SemVer 2.0.0.
119
     # The version is compatible with SemVer 2.0.0.
123
     #
120
     #
124
     # Examples:
121
     # Examples:
125
     #
122
     #
126
-    #     myprog v1.0.7                         # all clear
127
-    #     myprog v1.0.7-alpha                   # mkit.ini: project:prerl="alpha"
128
-    #     myprog v1.0.7-alpha+g1aef811.master   # ^^ + some commits after
129
-    #     myprog v1.0.7-alpha+gf14fc4f.api2     # ^^ + on a feature branch
130
-    #     myprog v1.0.7-alpha+gf14fc4f.api2.dirty  # ^^ + tree edited
131
-    #     myprog v1.0.7-alpha+dirty             # tag OK but tree edited
132
-    #     myprog v1.0.7+dirty                   # ^^ but no pre-release id
123
+    #     foo v1.0.7                            # all clear; proper release
124
+    #     foo v1.0.7-beta                       # mkit.ini: project:prerl="beta"
125
+    #     foo v1.0.7-beta+g1aef811.master       # ^^ + some commits after
126
+    #     foo v1.0.7-beta+gf14fc4f.api2         # ^^ + on a feature branch
127
+    #     foo v1.0.7-beta+gf14fc4f.api2.dirty   # ^^ + tree edited
128
+    #     foo v1.0.7-beta+dirty                 # tag OK but tree edited
129
+    #     foo v1.0.7+dirty                      # ^^ but no pre-release id
133
     #
130
     #
134
     # Note that versions with "dirty" should be perceived as kind of
131
     # Note that versions with "dirty" should be perceived as kind of
135
     # dangerous outside developer's own machine.  Versions with sha1 are
132
     # dangerous outside developer's own machine.  Versions with sha1 are
136
     # safer but must not be released.
133
     # safer but must not be released.
137
     #
134
     #
138
-    # I have considered decorating the git commit refs to make them
139
-    # sort of sortable (e.g. "r1.g1aef811"), but on second thought,
140
-    # I don't think it's good idea to give *any* semantics to meta-data
141
-    # at all.  First, there is no rule that r1<r2<r3; a commit can be
142
-    # removing what other just added and one change can be split to
143
-    # multiple commits.  Also, the whole thing breaks anyway once you
144
-    # rebase your branch (no, it's not a sin).  The sole purpose of
145
-    # meta-data is to *identify* the code, and provide safe path back
146
-    # to tree; commit refs are already perfect for that.
147
-    #
148
     # FIXME:  Using project:prerl for release IDs may not be compatible with
135
     # FIXME:  Using project:prerl for release IDs may not be compatible with
149
     #         release strategy implemented in release.sh
136
     #         release strategy implemented in release.sh
150
     #
137
     #
151
-    local version       # version string (final result)
152
-    local prerl         # pre-release keyword (from mkit.ini, eg. 'alpha')
138
+    local xyz           # base version string
139
+    local prerl         # pre-release keyword (from mkit.ini, eg. 'beta')
153
     local latest_tag    # latest git tag
140
     local latest_tag    # latest git tag
154
     local commit        # commit indicator (CURRENT_BRANCH.gHASH)
141
     local commit        # commit indicator (CURRENT_BRANCH.gHASH)
155
     local dirty         # 0 if dirty, 1 if clean
142
     local dirty         # 0 if dirty, 1 if clean
156
     local suffix        # version suffix
143
     local suffix        # version suffix
157
-    local_get semver && return 0
158
-    version=$(ini 1value project:version)
159
     prerl=$(ini 1value project:prerl)
144
     prerl=$(ini 1value project:prerl)
160
     grep ":" <<<"$prerl" \
145
     grep ":" <<<"$prerl" \
161
      && warn "colon in project:prerl may corrupt version data: $prerl"
146
      && warn "colon in project:prerl may corrupt version data: $prerl"
162
-    if git_present;
163
-    then    # we are in git repo... so we can get smart
164
-        latest_tag=$(git_fact latest_tag)
165
-        if ! git describe --tags --exact-match HEAD >&/dev/null;
166
-        then    # we are at a later commit than the last tag
167
-            commit="$(git_fact current_branch).g$(git_fact latest_sha)"
168
-        fi
169
-        git_bool dirty; dirty=$?
170
-        test -n "$latest_tag" && version=${latest_tag:1}
171
-        case "$dirty:$commit" in
172
-            1:)  suffix=""               ;;
173
-            0:)  suffix="+dirty"         ;;
174
-            1:*) suffix="+$commit"       ;;
175
-            0:*) suffix="+$commit.dirty" ;;
176
-            *)   suffix=MKIT_BUG
177
-                 warn "MKIT_BUG: bad dirt/commit detection" ;;
178
-        esac
179
-        test -n "$prerl" && suffix="-$prerl$suffix"
180
-        version="$version$suffix"
147
+    git_present || {
148
+        echo UNKNOWN_VERSION
149
+        warn "no git present; could not determine SemVer"
150
+        return 3
151
+    }
152
+    latest_tag=$(git_fact latest_tag)
153
+    case $latest_tag in
154
+        v*) xyz=${latest_tag:1} ;;
155
+        "") warn "no tags, using base version from mkit.ini (ok for new project)"
156
+            xyz=$(ini 1value project:version) ;;
157
+        *)  warn "bad form of last tag, using base version from mkit.ini: tag is '$latest_tag'"
158
+            xyz=$(ini 1value project:version) ;;
159
+    esac
160
+    if ! git describe --tags --exact-match HEAD >&/dev/null;
161
+    then    # we are at a later commit than the last tag
162
+        commit="$(git_fact current_branch).g$(git_fact latest_sha)"
181
     fi
163
     fi
182
-    local_putb semver <<<"$version"
183
-    echo "$version"
164
+    git_bool dirty; dirty=$?
165
+    case "$dirty:$commit" in
166
+        1:)  suffix=""               ;;
167
+        0:)  suffix="+dirty"         ;;
168
+        1:*) suffix="+$commit"       ;;
169
+        0:*) suffix="+$commit.dirty" ;;
170
+        *)   suffix=MKIT_BUG
171
+             warn "MKIT_BUG: bad dirt/commit detection" ;;
172
+    esac
173
+    test -n "$prerl" && suffix="-$prerl$suffix"
174
+    echo "$xyz$suffix"
184
 }
175
 }

+ 0
- 34
utils/mkit/include/mkit.sh View File

125
      || die "bad mkit.ini version: $their_ver does not match $MKIT_VERSION"
125
      || die "bad mkit.ini version: $their_ver does not match $MKIT_VERSION"
126
 }
126
 }
127
 
127
 
128
-local_putb() {
129
-    #
130
-    # Make file $1 in $MKIT_LOCAL from stdin and mark as built
131
-    #
132
-    local fpath=$1
133
-    local_put "$fpath" && rec_built "$MKIT_LOCAL/$fpath"
134
-}
135
-
136
-local_put() {
137
-    #
138
-    # Make file $1 in $MKIT_LOCAL from stdin
139
-    #
140
-    local fpath="$MKIT_LOCAL/$1"
141
-    { mkdir -p "${fpath%/*}" && cat >"$fpath"; } \
142
-     || die "cannot write to local cache: $fpath"
143
-}
144
-
145
-local_get() {
146
-    #
147
-    # Read file $1 in $MKIT_LOCAL
148
-    #
149
-    local fpath="$MKIT_LOCAL/$1"
150
-    cat "$fpath" 2>/dev/null
151
-}
152
-
153
 mkit_init() {
128
 mkit_init() {
154
     #
129
     #
155
     # Do basic initialization
130
     # Do basic initialization
163
     __chkiniversion
138
     __chkiniversion
164
 }
139
 }
165
 
140
 
166
-rec_built() {
167
-    #
168
-    # Record file $1 for deletion on `clean`
169
-    #
170
-    local file=$1
171
-    mkdir -p "$MKIT_LOCAL"
172
-    echo "$file" >> "$MKIT_LOCAL/built.lst"
173
-}
174
-
175
 route() {
141
 route() {
176
     #
142
     #
177
     # Call correct function based on $1
143
     # Call correct function based on $1

+ 1
- 1
utils/mkit/include/vars.sh View File

58
 #
58
 #
59
 # This MKit version
59
 # This MKit version
60
 #
60
 #
61
-MKIT_VERSION=0.0.28
61
+MKIT_VERSION=0.0.29

+ 3
- 12
utils/mkit/stub View File

141
             echo 'Summary:    __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__'
141
             echo 'Summary:    __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__'
142
             test -n "$VcsBrowser" && echo 'URL:        __MKIT_PROJ_VCS_BROWSER__'
142
             test -n "$VcsBrowser" && echo 'URL:        __MKIT_PROJ_VCS_BROWSER__'
143
             $MkLicense && echo "License:    $License"
143
             $MkLicense && echo "License:    $License"
144
-            echo ''
145
             echo 'Source0:    %{name}-%{version}.tar.gz'
144
             echo 'Source0:    %{name}-%{version}.tar.gz'
146
             echo 'BuildArch:  noarch'
145
             echo 'BuildArch:  noarch'
147
             echo ''
146
             echo ''
177
             echo 'Section: misc'
176
             echo 'Section: misc'
178
             echo 'Priority: extra'
177
             echo 'Priority: extra'
179
             echo 'Standards-Version: 3.9.2'
178
             echo 'Standards-Version: 3.9.2'
180
-            echo 'Build-Depends: debhelper (>= 9)'
179
+            echo 'Build-Depends:'
180
+            echo ' debhelper (>= 9),'
181
             echo ''
181
             echo ''
182
             echo 'Package: __MKIT_PROJ_PKGNAME__'
182
             echo 'Package: __MKIT_PROJ_PKGNAME__'
183
             echo 'Architecture: all'
183
             echo 'Architecture: all'
245
             echo "everything, so few things still need to be done manually."
245
             echo "everything, so few things still need to be done manually."
246
             echo "This document will guide you throught the rest of the"
246
             echo "This document will guide you throught the rest of the"
247
             echo "process."
247
             echo "process."
248
-
249
             echo ""
248
             echo ""
250
             echo ""
249
             echo ""
251
             echo "Structure"
250
             echo "Structure"
293
             echo "    idea!), be prepared that you will need to follow their"
292
             echo "    idea!), be prepared that you will need to follow their"
294
             echo "    guidelines.  This will most probably mean huge changes"
293
             echo "    guidelines.  This will most probably mean huge changes"
295
             echo "    to these packages or even changes to your workflow."
294
             echo "    to these packages or even changes to your workflow."
296
-
297
             echo ""
295
             echo ""
298
             echo ""
296
             echo ""
299
             echo "Placeholders"
297
             echo "Placeholders"
357
             echo "    Typical example of a role is e.g. 'bin' for commands"
355
             echo "    Typical example of a role is e.g. 'bin' for commands"
358
             echo "    (normally under '/usr/bin' or '/usr/local/bin'), 'doc'"
356
             echo "    (normally under '/usr/bin' or '/usr/local/bin'), 'doc'"
359
             echo "    for documents or 'lib' for libraries."
357
             echo "    for documents or 'lib' for libraries."
360
-
361
             echo ""
358
             echo ""
362
             echo " 2. Next, in \`[roots]\` section, you have to set target"
359
             echo " 2. Next, in \`[roots]\` section, you have to set target"
363
             echo "    root directory for each role.  However, in order to"
360
             echo "    root directory for each role.  However, in order to"
366
             echo "    environment variable.  For this reason, most paths"
363
             echo "    environment variable.  For this reason, most paths"
367
             echo "    need to start with \`[ENV:PREFIX]\`."
364
             echo "    need to start with \`[ENV:PREFIX]\`."
368
             echo ""
365
             echo ""
369
-
370
             echo " 3. \`[files]\` section is where you assign actual files"
366
             echo " 3. \`[files]\` section is where you assign actual files"
371
             echo "    from your repository to their final paths.  The format"
367
             echo "    from your repository to their final paths.  The format"
372
             echo "    is \`ROLE = REPOPATH [RENAMED]\`, where ROLE is file's"
368
             echo "    is \`ROLE = REPOPATH [RENAMED]\`, where ROLE is file's"
381
             echo "    individually, if in your repo you have a directory with"
377
             echo "    individually, if in your repo you have a directory with"
382
             echo "    100 files of the same role, you can add just path to the"
378
             echo "    100 files of the same role, you can add just path to the"
383
             echo "    directory itself."
379
             echo "    directory itself."
384
-
385
             echo ""
380
             echo ""
386
             echo " 4. If some roles require special permissions on your files,"
381
             echo " 4. If some roles require special permissions on your files,"
387
             echo "    \`[modes]\` section is your friend.  Permissions here"
382
             echo "    \`[modes]\` section is your friend.  Permissions here"
388
             echo "    should be in UNIX octal format."
383
             echo "    should be in UNIX octal format."
389
-
390
             echo ""
384
             echo ""
391
             echo " 5. Next, \`[tokens]\` section allows you to define own"
385
             echo " 5. Next, \`[tokens]\` section allows you to define own"
392
             echo "    placeholders that will be replaced when your scripts are"
386
             echo "    placeholders that will be replaced when your scripts are"
396
             echo "    defined here, plus range of tokens automatically defined"
390
             echo "    defined here, plus range of tokens automatically defined"
397
             echo "    by MKit.  During build, these tokens are replaced with"
391
             echo "    by MKit.  During build, these tokens are replaced with"
398
             echo "    their actual values."
392
             echo "    their actual values."
399
-
400
             echo ""
393
             echo ""
401
             echo " 6. Less interesting, but important section is \`[dist]\`,"
394
             echo " 6. Less interesting, but important section is \`[dist]\`,"
402
             echo "    which lists files in your codebase that will be added"
395
             echo "    which lists files in your codebase that will be added"
404
             echo "    above).  Listing directory here will include all its"
397
             echo "    above).  Listing directory here will include all its"
405
             echo "    contents, and normally it's OK to be very inclusive, so"
398
             echo "    contents, and normally it's OK to be very inclusive, so"
406
             echo "    most of the time this section should be OK."
399
             echo "    most of the time this section should be OK."
407
-
408
             echo ""
400
             echo ""
409
             echo " 7. Even less interesting is section \`[ENV]\`.  It is"
401
             echo " 7. Even less interesting is section \`[ENV]\`.  It is"
410
             echo "    special in that it provides *default* value for an"
402
             echo "    special in that it provides *default* value for an"
411
             echo "    environment variable.  You almost never need to touch"
403
             echo "    environment variable.  You almost never need to touch"
412
             echo "    this."
404
             echo "    this."
413
             echo ""
405
             echo ""
414
-
415
             echo " 8. Finally, the most interesting section!  \`[project]\`,"
406
             echo " 8. Finally, the most interesting section!  \`[project]\`,"
416
             echo "    provides most general information for your project such"
407
             echo "    provides most general information for your project such"
417
             echo "    as name and version."
408
             echo "    as name and version."
494
         echo "    -R            skip creating README.md"
485
         echo "    -R            skip creating README.md"
495
         echo "    -M            skip creating Makefile"
486
         echo "    -M            skip creating Makefile"
496
         echo "    -P            skip creating packaging templates"
487
         echo "    -P            skip creating packaging templates"
497
-        echo "    -L            list know licenses and exit"
488
+        echo "    -L            list known licenses and exit"
498
         echo ""
489
         echo ""
499
         echo "PKGNAME should be packaging-friendly name, ie. consist"
490
         echo "PKGNAME should be packaging-friendly name, ie. consist"
500
         echo "only of small letters, numbers, underscore and dash."
491
         echo "only of small letters, numbers, underscore and dash."