From f3dd36b8da79e5a3171d7b422c0efc6c15bf8796 Mon Sep 17 00:00:00 2001 From: Fabian Blaese Date: Sun, 5 Nov 2017 11:03:35 +0100 Subject: [PATCH] configurehood: Allow for spaces after identifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some JSON beautifiers put spaces between identifier and value. This is necessary to tolerate that. Signed-off-by: Fabian Bläse Reviewed-by: Tim Niemeyer --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index ba34329..7bb976e 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -144,8 +144,8 @@ if [ -s "$hoodfile" ]; then json_get_var mesh_type5 mesh_type5 fi - catnew="$(cat "$hoodfile" | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" - catold="$(cat "$hoodfilecopy" 2>/dev/null | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" + catnew="$(cat "$hoodfile" | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" + catold="$(cat "$hoodfilecopy" 2>/dev/null | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ") sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ")