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