mirror of
https://github.com/mr0xb/scripts.git
synced 2026-08-27 19:34:57 -04:00
initial commit
This commit is contained in:
commit
2f723ac7ee
5 changed files with 165 additions and 0 deletions
18
install/install-yq
Executable file
18
install/install-yq
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/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 a new issue