unet-cli: use modern ucode syntax
authorJo-Philipp Wich <jo@mein.io>
Wed, 24 Aug 2022 22:43:07 +0000 (00:43 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 25 Aug 2022 10:34:40 +0000 (12:34 +0200)
commita1850a0f7b5b36d997ed6add65b84f76e343d130
tree6ca26f3d2d828302ae7260fe05fbfcd714441c6f
parent355493f3fd39be90b8cd6a0c889d5864eec9e59a
unet-cli: use modern ucode syntax

Refactor various places in the script to use modern syntax, such as
template strings or `in` lookups.

Also introduce a simple `assert()` helper function to deal with the
repeated `if (!cond) { warn(msg); exit(1) }` pattern.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
scripts/unet-cli