Linux improvements
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
6b4546694b
commit
9271bddf7a
24
install.sh
24
install.sh
@ -35,6 +35,7 @@ BREW_TOOLS=(
|
|||||||
CARGO_TOOLS=( bottom )
|
CARGO_TOOLS=( bottom )
|
||||||
NODE_TOOLS=( git-split-diffs )
|
NODE_TOOLS=( git-split-diffs )
|
||||||
KREW_TOOLS=( gs outdated tree stern )
|
KREW_TOOLS=( gs outdated tree stern )
|
||||||
|
APT_TOOLS=( zsh )
|
||||||
|
|
||||||
echo "🔵 Installing / updating tools"
|
echo "🔵 Installing / updating tools"
|
||||||
|
|
||||||
@ -44,7 +45,11 @@ for tool in "${BREW_TOOLS[@]}"
|
|||||||
do
|
do
|
||||||
printf "${tool}..."
|
printf "${tool}..."
|
||||||
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
|
else
|
||||||
|
printf " ❌\n"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Cargo
|
# Cargo
|
||||||
@ -52,7 +57,11 @@ for tool in "${CARGO_TOOLS[@]}"
|
|||||||
do
|
do
|
||||||
printf "${tool}..."
|
printf "${tool}..."
|
||||||
cargo install ${tool} &>/dev/null
|
cargo install ${tool} &>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
|
else
|
||||||
|
printf " ❌\n"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Krew
|
# Krew
|
||||||
@ -61,7 +70,11 @@ for tool in "${KREW_TOOLS[@]}"
|
|||||||
do
|
do
|
||||||
printf "${tool}..."
|
printf "${tool}..."
|
||||||
kubectl-krew upgrade ${tool} &>/dev/null || kubectl-krew install ${tool} &>/dev/null
|
kubectl-krew upgrade ${tool} &>/dev/null || kubectl-krew install ${tool} &>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
|
else
|
||||||
|
printf " ❌\n"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
fulllink() {
|
fulllink() {
|
||||||
@ -78,7 +91,12 @@ echo "Detected OS type: ${OSTYPE}"
|
|||||||
|
|
||||||
case "${OSTYPE}" in
|
case "${OSTYPE}" in
|
||||||
*linux*)
|
*linux*)
|
||||||
# Do stuff
|
# Install Debian/Ubuntu specific packages
|
||||||
|
if command -v apt &>/dev/null; then
|
||||||
|
sudo apt install -y ${APT_TOOLS}
|
||||||
|
fi
|
||||||
|
# Set correct permissions on compinit dir
|
||||||
|
sudo chmod -R 755 /usr/local/share/zsh/site-functions
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
# Mac specific setup
|
# Mac specific setup
|
||||||
@ -87,7 +105,11 @@ case "${OSTYPE}" in
|
|||||||
do
|
do
|
||||||
printf "${tool}..."
|
printf "${tool}..."
|
||||||
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
|
else
|
||||||
|
printf " ❌\n"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user