Add 'yq/install_yq_latest_version.sh'
This commit is contained in:
parent
618483fedb
commit
be3e02dff5
18
yq/install_yq_latest_version.sh
Normal file
18
yq/install_yq_latest_version.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user