[Git-commits] [grml/grml-live] 50d26f: buildinfo generation: avoid error message with old...

Michael Prokop noreply at github.com
Wed Jan 26 13:28:04 CET 2022


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-live
  Commit: 50d26fbbebaec63a8e7612dafce3f46e9b6126bb
      https://github.com/grml/grml-live/commit/50d26fbbebaec63a8e7612dafce3f46e9b6126bb
  Author: Michael Prokop <mika at grml.org>
  Date:   2022-01-26 (Wed, 26 Jan 2022)

  Changed paths:
    M grml-live

  Log Message:
  -----------
  buildinfo generation: avoid error message with older versions of jo

We use the jo(1) tool for generating /conf/buildinfo.json.
To avoid syntax errors when sorting the list of keys/values, we
also end the last entry (wayback_date=...) with a "\", so the next
line is considered, and reordering the list is simple.

The usage of ":" isn't supported by older versions of jo, though:

| % jo -v
| jo 1.0
| % jo -p foo=bar :
| Argument `:' is neither k=v nor k at v
| {
|    "foo": "bar"
| }

FTR, newer versions don't cause any failure messages:

| % jo -v
| jo 1.3
| % jo -p foo=bar :
| {
|    "foo": "bar"
| }

Since there's no strong need to use ":", the error message might look
like the /conf/buildinfo.json isn't generated (while it still is), and
I'd like to keep sorting the list easy and error free, let's fix this.
Usage of "--" usually ends list of command line options, let's use this
pattern instead.




More information about the Git-commits mailing list