mirror of https://github.com/rwxrob/dot
add install-yq
parent
1ce7c4ca6e
commit
5a64973fa7
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
url="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64"
|
||||
dir=$(mktemp -d)
|
||||
|
||||
cleanup () {
|
||||
rm -rf "$dir"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
curl -L "$url" -o "$dir/yq"
|
||||
chmod +x "$dir/yq"
|
||||
|
||||
# mkdir -p is not POSIX compliant
|
||||
[ ! -d ~/.local ] && mkdir ~/.local
|
||||
[ ! -d ~/.local/bin ] && mkdir ~/.local/bin
|
||||
|
||||
cp "$dir/yq" ~/.local/bin
|
Loading…
Reference in New Issue