Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions assets/install-kube-ps1-bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P)

if [ -f ~/.bashrc ] && ! grep -q "kube_ps1" ~/.bashrc; then
curl -sLO https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh && \
chmod +x kube-ps1.sh
if [ ! -x kube-ps1.sh ]; then
curl -sLO https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh
chmod +x kube-ps1.sh
fi

if [ -f ~/.bashrc ] && ! grep -q "kube_ps1" ~/.bashrc; then
cat "${SCRIPT_DIR}/config/bash-kube" >> ~/.bashrc
fi

8 changes: 5 additions & 3 deletions assets/install-kube-ps1-zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P)

if [ -f ~/.zshrc ] && ! grep -q "kube_ps1" ~/.zshrc; then
curl -sLO https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh && \
chmod +x kube-ps1.sh
if [ ! -x kube-ps1.sh ]; then
curl -sLO https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh
chmod +x kube-ps1.sh
fi

if [ -f ~/.zshrc ] && ! grep -q "kube_ps1" ~/.zshrc; then
cat "${SCRIPT_DIR}/config/zsh-kube" >> ~/.zshrc
fi