Better way to catch success or failure

This commit is contained in:
Bjarne Saltbaek 2022-10-01 13:38:04 +02:00
parent 70ed6b96d1
commit 7e1d9a2872

View File

@ -139,7 +139,7 @@ _get_root() {
}
_successful_update() {
if (echo "$_result" | grep -q 'newserial'); then return 0; fi
if (echo "$_result" | egrep -o 'data":\[[^]]*]' | grep -q '"newserial":null'); then return 1; fi
return 1
}