Compare commits
2 Commits
6b4546694b
...
2ffd1172bf
Author | SHA1 | Date | |
---|---|---|---|
2ffd1172bf | |||
9271bddf7a |
35
install.sh
35
install.sh
@ -9,6 +9,7 @@ GITEMAIL=$(git config --get user.email)
|
||||
|
||||
# Install homebrew
|
||||
which brew >/dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
brew tap homebrew/core
|
||||
|
||||
echo "🔵 Setting up zsh"
|
||||
|
||||
@ -23,6 +24,9 @@ printf "Cloning zsh plugins..."
|
||||
[ -d ${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
printf " ✅\n"
|
||||
|
||||
# Set correct permissions on compinit dir
|
||||
sudo chmod -R 755 /usr/local/share/zsh/site-functions
|
||||
|
||||
# Install tools
|
||||
BREW_TOOLS=(
|
||||
argocd bandwhich bat danielfoehrkn/switch/switch derailed/k9s/k9s dive doggo duf dust exa fd fzf
|
||||
@ -35,16 +39,27 @@ BREW_TOOLS=(
|
||||
CARGO_TOOLS=( bottom )
|
||||
NODE_TOOLS=( git-split-diffs )
|
||||
KREW_TOOLS=( gs outdated tree stern )
|
||||
APT_TOOLS=( zsh gcc )
|
||||
|
||||
echo "🔵 Installing / updating tools"
|
||||
|
||||
# Install Debian/Ubuntu specific packages if apt exists
|
||||
if command -v apt &>/dev/null; then
|
||||
echo "`apt` found on system, assuming Ubuntu/Debian and installing pre-requisites..."
|
||||
sudo apt install -y ${APT_TOOLS}
|
||||
fi
|
||||
|
||||
# Homebrew
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=true
|
||||
for tool in "${BREW_TOOLS[@]}"
|
||||
do
|
||||
printf "${tool}..."
|
||||
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
||||
printf " ✅\n"
|
||||
if [ $? -eq 0 ]; then
|
||||
printf " ✅\n"
|
||||
else
|
||||
printf " ❌\n"
|
||||
fi
|
||||
done
|
||||
|
||||
# Cargo
|
||||
@ -52,7 +67,11 @@ for tool in "${CARGO_TOOLS[@]}"
|
||||
do
|
||||
printf "${tool}..."
|
||||
cargo install ${tool} &>/dev/null
|
||||
printf " ✅\n"
|
||||
if [ $? -eq 0 ]; then
|
||||
printf " ✅\n"
|
||||
else
|
||||
printf " ❌\n"
|
||||
fi
|
||||
done
|
||||
|
||||
# Krew
|
||||
@ -61,7 +80,11 @@ for tool in "${KREW_TOOLS[@]}"
|
||||
do
|
||||
printf "${tool}..."
|
||||
kubectl-krew upgrade ${tool} &>/dev/null || kubectl-krew install ${tool} &>/dev/null
|
||||
printf " ✅\n"
|
||||
if [ $? -eq 0 ]; then
|
||||
printf " ✅\n"
|
||||
else
|
||||
printf " ❌\n"
|
||||
fi
|
||||
done
|
||||
|
||||
fulllink() {
|
||||
@ -87,7 +110,11 @@ case "${OSTYPE}" in
|
||||
do
|
||||
printf "${tool}..."
|
||||
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
||||
printf " ✅\n"
|
||||
if [ $? -eq 0 ]; then
|
||||
printf " ✅\n"
|
||||
else
|
||||
printf " ❌\n"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user