Skip to content

Commit e9e4cfc

Browse files
committed
feat(terminal): Installer for fubectl
Signed-off-by: Mateusz Łoskot <mateusz@loskot.net>
1 parent 37e3859 commit e9e4cfc

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

config/bash/dot-bash.d/fubectl.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
if test ! -f ~/.config/fubectl/fubectl.source; then
3+
return
4+
fi
5+
6+
source ~/.config/fubectl/fubectl.source

config/bash/dot-bash.d/kubernetes.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ complete -o default -F __start_kubectl k
99
PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
1010
export PATH
1111

12-
# kubectl
12+
# K9s
13+
alias k9r='k9s --readonly --command pulses'
14+
15+
# kubectl, unless fubectl exists
16+
if test -f ~/.config/fubectl/fubectl.source; then
17+
return
18+
fi
1319
alias k='kubectl'
1420
alias ka='kubectl apply'
1521
alias kci='kubectl cluster-info'
@@ -30,6 +36,3 @@ alias kx='kubectl exec -i -t'
3036
# Unset SHELL for Git Bash, see https://github.com/ahmetb/kubectx/issues/330#issuecomment-1506657091
3137
alias kctx='SHELL= kubectx'
3238
alias kns='SHELL= kubens'
33-
34-
# K9s
35-
alias k9r='k9s --readonly --command pulses'

install/terminal/app-fubectl.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
source ~/.dotfiles/err.sh "${BASH_SOURCE[0]}"
3+
source ~/.dotfiles/log.sh "${BASH_SOURCE[0]}"
4+
5+
echolog "Installing fubectl"
6+
7+
curl -LO https://rawgit.com/kubermatic/fubectl/main/fubectl.source
8+
rm -rf ~/.config/fubectl
9+
mkdir -p ~/.config/fubectl
10+
mv fubectl.source ~/.config/fubectl/fubectl.source
11+
12+
echolog "Installed $(file ~/.config/fubectl/fubectl.source)"

0 commit comments

Comments
 (0)