mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
feat: add machineClass and ssh config
This commit is contained in:
31
run_onchange_before_11_zsh.sh
Normal file
31
run_onchange_before_11_zsh.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if ! type zsh > /dev/null; then
|
||||
echo "Cannnot change default shell to zsh: not installed"
|
||||
else
|
||||
# Make ZSH the default shell environment
|
||||
if [ $(cat /etc/passwd | grep $USER | awk -F ':' '{print substr($7, length($7)-3)}') != "/zsh" ]; then
|
||||
echo "Changing shell to zsh."
|
||||
chsh -s $(which zsh)
|
||||
else
|
||||
echo "Shell is already zsh."
|
||||
fi
|
||||
|
||||
# Antidote Installation
|
||||
if [ ! -d "$HOME/.antidote" ]; then
|
||||
echo "Installing Antidote"
|
||||
|
||||
# make sure git is installed
|
||||
if ! type git > /dev/null; then
|
||||
echo "Git not installed. Cannot install antidote"
|
||||
else
|
||||
git clone --depth=1 https://github.com/mattmc3/antidote.git $HOME/.antidote
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Antidote already exists."
|
||||
fi
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user