auto update

This commit is contained in:
daniel
2023-03-19 14:18:49 +01:00
parent 8c770554ca
commit 94a192b651
3 changed files with 91 additions and 27 deletions

View File

@@ -1,30 +1,5 @@
#!/bin/bash
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)
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
# fzf
if [ ! -d "$HOME/.fzf" ]; then
git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf
@@ -51,5 +26,33 @@ fi
# linking dotfiles
$HOME/.dotfiles/dotfiles.sh link base
# reload shell
zsh
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)
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
# reload shell
source ~/.zshrc
fi