mirror of https://gitlab.com/dabruh/dotfiles.git
Install krew
This commit is contained in:
parent
a5db9cdc9a
commit
efb6243145
|
@ -169,6 +169,18 @@ function setup_brew_formulas() {
|
|||
done
|
||||
}
|
||||
|
||||
function setup_krew() {
|
||||
set -x
|
||||
cd "$(mktemp -d)" &&
|
||||
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
|
||||
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
|
||||
KREW="krew-${OS}_${ARCH}" &&
|
||||
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
|
||||
tar zxvf "${KREW}.tar.gz" &&
|
||||
./"${KREW}" install krew
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
}
|
||||
|
||||
function setup_krew_plugins() {
|
||||
local targets=("krew-any") packages
|
||||
|
||||
|
@ -248,7 +260,8 @@ function setup_arch() {
|
|||
configure_ufw || return 6
|
||||
setup_homebrew || return 7
|
||||
setup_brew_formulas || return 8
|
||||
setup_krew_plugins || return 9
|
||||
setup_krew || return 9
|
||||
setup_krew_plugins || return 10
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -303,7 +316,8 @@ function setup_debian() {
|
|||
configure_ufw || return 6
|
||||
setup_homebrew || return 7
|
||||
setup_brew_formulas || return 8
|
||||
setup_krew_plugins || return 9
|
||||
setup_krew || return 9
|
||||
setup_krew_plugins || return 10
|
||||
}
|
||||
|
||||
ID_LIKE="$(grep ID_LIKE= </etc/os-release | cut -d= -f2)"
|
||||
|
|
Loading…
Reference in New Issue