From 50d26fbbebaec63a8e7612dafce3f46e9b6126bb Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 26 Jan 2022 13:27:23 +0100 Subject: [PATCH] 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@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. --- grml-live | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grml-live b/grml-live index cd9290e..e524e71 100755 --- a/grml-live +++ b/grml-live @@ -1498,7 +1498,7 @@ generate_build_info() { timestamp="$(TZ=UTC date +%s)" \ update_only="${UPDATE}" \ wayback_date="${WAYBACK_DATE}" \ - : + -- } # }}} -- 2.1.4