From be3e02dff527747ed6be752889c95ef48283de1c Mon Sep 17 00:00:00 2001 From: sthope Date: Mon, 6 Sep 2021 14:06:48 +0200 Subject: [PATCH] Add 'yq/install_yq_latest_version.sh' --- yq/install_yq_latest_version.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 yq/install_yq_latest_version.sh diff --git a/yq/install_yq_latest_version.sh b/yq/install_yq_latest_version.sh new file mode 100644 index 0000000..2eaa793 --- /dev/null +++ b/yq/install_yq_latest_version.sh @@ -0,0 +1,18 @@ +################################### +############ by Sthope ############ +################################### + +## nano ~/.bashrc +## and add this to the end of the file: export PATH=$PATH:~/bin +## sudo chmod +x ~/bin/*;su -l $USER + +#### USAGE +# +# + +VERSION=$(curl -s "https://api.github.com/repos/mikefarah/yq/releases/latest" | awk -F '"' '/tag_name/{print $4}') +BINARY=yq_linux_amd64 + +### Download +wget -q https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\ + tar xz && mv ${BINARY} /usr/bin/yq