mirror of
https://github.com/rwxrob/dot
synced 2024-11-10 13:10:37 +00:00
21 lines
362 B
Bash
Executable File
21 lines
362 B
Bash
Executable File
#!/bin/sh
|
|
|
|
url="https://github.com/rwxrob/keg/releases/latest/download/keg-darwin-amd64"
|
|
exe=keg
|
|
|
|
dir=$(mktemp -d)
|
|
|
|
cleanup () {
|
|
rm -rf "$dir"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
curl -L "$url" -o "$dir/$exe"
|
|
chmod +x "$dir/$exe"
|
|
|
|
# mkdir -p is not POSIX compliant
|
|
[ ! -d ~/.local ] && mkdir ~/.local
|
|
[ ! -d ~/.local/bin ] && mkdir ~/.local/bin
|
|
|
|
cp "$dir/$exe" ~/.local/bin
|