Add 'yq/install_yq_latest_version.sh'

This commit is contained in:
sthope 2021-09-06 14:06:48 +02:00
parent 618483fedb
commit be3e02dff5

View File

@ -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