.dotfiles/auto-config-cli.sh

76 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
if [ $(id -u) -eq 0 ]
then echo "Root access not needed"; exit
fi
install_git_repo () {
if [ ! -d "$2" ]
then
echo "Cloning $1 in $2"
git clone $1 $2 --depth=1
else
echo "Pulling $1 in $2"
cd $2
git pull
fi
}
# Install packages
sudo apt update
sudo apt upgrade
sudo apt install minicom ssh git tig ack tree npm cargo python3-pip curl zsh
# Install Oh my ZSH
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Update Oh my ZSH
omz update
# Install Oh my ZSH plugins
install_git_repo https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
install_git_repo https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
install_git_repo https://github.com/zsh-users/zsh-history-substring-search.git $HOME/.oh-my-zsh/custom/plugins/zsh-history-substring-search
# Aliases
ln -sfn $HOME/.dotfiles/.bash_aliases $HOME/.bash_aliases
# ZSHRC
ln -sfn $HOME/.dotfiles/.zshrc $HOME/.zshrc
# ZSH Themes
ln -sfn $HOME/.dotfiles/vulporuza.zsh-theme $HOME/.oh-my-zsh/custom/themes/vulporuza.zsh-theme
# ZSH GIT Prompt
install_git_repo https://github.com/zsh-git-prompt/zsh-git-prompt.git $HOME/.zsh-git-prompt
# GIT Prompt
install_git_repo https://github.com/magicmonty/bash-git-prompt.git $HOME/.bash-git-prompt
# GIT Autofixup
install_git_repo https://github.com/torbiak/git-autofixup.git $HOME/.git-autofixup
# GIT fzf
install_git_repo https://github.com/junegunn/fzf.git $HOME/.fzf
# Install fzf
$HOME/.fzf/install
# Install navi
cargo install navi
mkdir -p $HOME/.local/share/navi/cheats
ln -sfn $HOME/.dotfiles/navi/ $HOME/.local/share/navi/cheats/vulporuza
# Update pip
pip3 install --upgrade pip
# Install undervolt
sudo pip3 install undervolt
# Update npm
sudo npm install -g npm
# Install rebase-editor
sudo npm install -g rebase-editor
git config --global sequence.editor rebase-editor