Skip to content

Commit

Permalink
Add yq to tools
Browse files Browse the repository at this point in the history
  • Loading branch information
trnubo committed May 26, 2023
1 parent cc4ce32 commit 0a06138
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ install_lego() {
rm lego
}

install_yq() {
local version checksum checksum_var version_parts major_minor
version="${1}"
checksum_var="YQ_${version//\./_}_CHECKSUM_${ARCH^^}"
checksum="${!checksum_var}"

echo "https://github.com/mikefarah/yq/releases/download/v${version}/yq_linux_${!ARCH}.tar.gz"
echo "${checksum}"

wget -nv "https://github.com/mikefarah/yq/releases/download/v${version}/yq_linux_${!ARCH}.tar.gz"
echo "${checksum} yq_linux_${!ARCH}.tar.gz" > SHA256SUM
sha256sum -c SHA256SUM || ( echo "Expected $(sha256sum yq_linux_${!ARCH}.tar.gz)"; exit 1; )

tar -zxf yq_linux_${!ARCH}.tar.gz ./yq_linux_${!ARCH}
install -o root -g root -m 755 yq_linux_${!ARCH} "/opt/bin/yq"
rm yq_linux_${!ARCH}
}

install_helm() {
local version checksum checksum_var version_parts major_minor
version="${1}"
Expand Down Expand Up @@ -160,6 +178,9 @@ SOPS_3_7_3_CHECKSUM_AARCH64=4945313ed0dfddba52a12ab460d750c91ead725d734039493da0
LEGO_4_4_0_CHECKSUM_X86_64=302a780a56dd52601aa5d1dc31e607599cb85b113830abe464001622ca8b80a2
LEGO_4_4_0_CHECKSUM_AARCH64=abe0e795be083143bc72ffe0f62670d96d1d33caeec2649b452d6fe9ac7ede4f

YQ_4_34_1_CHECKSUM_X86_64=df8b1ea3ebd84bac31691e5b77b87c798f64c845370593e56603b9892cea3e1c
YQ_4_34_1_CHECKSUM_AARCH64=e43d788ca14c9bd949ed1c828d6073a6b42d8c78c9e454095699b1a1e844abf2

ARGO_3_1_5_CHECKSUM_X86_64=68ebb30e79aa5ab649dbd0feb6e227b0dcff2b2983c00e176cc523a9f883567b
ARGO_3_1_5_CHECKSUM_AARCH64=dc3c36081b6b49c8977dcffa9393a29e83568fba36a35f472caaac108674c03e
ARGO_3_4_5_CHECKSUM_X86_64=0528ff0c0aa87a3f150376eee2f1b26e8b41eb96578c43d715c906304627d3a1
Expand All @@ -169,6 +190,8 @@ install_sops 3.7.3

install_lego 4.4.0

install_yq 4.34.1

install_helm 3.6.3
install_helm 3.7.2
install_helm 3.8.2
Expand Down

0 comments on commit 0a06138

Please sign in to comment.