From 63b95117bce4ef69d5e932a70606549f8684c425 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 31 Aug 2022 20:00:03 +0200 Subject: [PATCH] new: [base] add ``yq`` to our base install Signed-off-by: Valentin Lab --- precise/base-0k/hooks/install.d/00-base.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/precise/base-0k/hooks/install.d/00-base.sh b/precise/base-0k/hooks/install.d/00-base.sh index d0eff0e..848c970 100755 --- a/precise/base-0k/hooks/install.d/00-base.sh +++ b/precise/base-0k/hooks/install.d/00-base.sh @@ -59,5 +59,11 @@ case $(lsb_release -is) in ;; esac - - +YQ_VERSION=4.27.3 +if ! type -p "yq" 2>/dev/null || + ! version_line=$(yq --version) || + [[ "${version_line}" != *"${YQ_VERSION}" ]]; then + wget "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" \ + -O /usr/local/bin/yq && + chmod +x /usr/local/bin/yq +fi \ No newline at end of file