From 2582585ecd437363590f89b1b2eae9d63b81d4d7 Mon Sep 17 00:00:00 2001 From: JosSamLoh <72921778+JosSamLoh@users.noreply.github.com> Date: Thu, 1 Jun 2023 15:50:23 +0000 Subject: [PATCH] refactor: Shorten FEDORA_VERSION line (#90) --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 06e695c..e0d330a 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,7 +13,7 @@ get_yaml_string() { } # Automatically determine which Fedora version we're building. -FEDORA_VERSION="$(cat /usr/lib/os-release | grep '^VERSION_ID=' | head -1 | sed 's,^VERSION_ID=,,')" +FEDORA_VERSION="$(cat /usr/lib/os-release | grep -Po '(?<=VERSION_ID=)\d+')" # Read configuration variables. BASE_IMAGE="$(get_yaml_string '.base-image')"