2021-03-20 22:36:25 +00:00
|
|
|
#/bin/bash
|
|
|
|
|
|
|
|
REPO_DIR=$(dirname $(readlink -f $0))
|
|
|
|
HOME_DIR=${HOME}
|
|
|
|
|
|
|
|
echo "REPO_DIR=${REPO_DIR}"
|
|
|
|
echo "HOME_DIR=${HOME_DIR}"
|
|
|
|
|
|
|
|
workspace_backup() {
|
|
|
|
mv $HOME_DIR/$1 $HOME_DIR/$1-old 2>/dev/null || true
|
|
|
|
}
|
|
|
|
|
|
|
|
workspace_link() {
|
2021-04-11 12:10:12 +00:00
|
|
|
mkdir -p $(dirname $HOME_DIR/$2)
|
2021-03-20 22:36:25 +00:00
|
|
|
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
|
|
|
|
}
|
|
|
|
|
2021-04-06 19:56:10 +00:00
|
|
|
echo "== zplug"
|
2021-11-23 19:36:10 +00:00
|
|
|
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh || true
|
2021-04-06 19:56:10 +00:00
|
|
|
|
2021-11-24 17:39:50 +00:00
|
|
|
echo "== starship"
|
|
|
|
if ! starship --help > /dev/null
|
|
|
|
then
|
2021-11-24 17:45:46 +00:00
|
|
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --yes
|
2021-11-24 17:39:50 +00:00
|
|
|
fi
|
|
|
|
|
2021-03-20 22:36:25 +00:00
|
|
|
echo "== Copying configuration files..."
|
|
|
|
# GIT
|
|
|
|
workspace_backup .gitconfig
|
|
|
|
workspace_link git/gitconfig .gitconfig
|
|
|
|
|
|
|
|
# SSH
|
|
|
|
workspace_backup .ssh/authorized_keys
|
|
|
|
workspace_link ssh/authorized_keys .ssh/authorized_keys
|
|
|
|
|
|
|
|
# TMUX
|
|
|
|
workspace_backup .tmux.conf
|
|
|
|
workspace_link tmux/tmux.conf .tmux.conf
|
|
|
|
|
|
|
|
# STARSHIP
|
|
|
|
workspace_backup .starship.toml
|
|
|
|
workspace_link starship/starship.toml .starship.toml
|
|
|
|
|
|
|
|
# ZSH
|
|
|
|
workspace_backup .zshrc
|
|
|
|
workspace_link zsh/zshrc .zshrc
|
|
|
|
|
|
|
|
# BIN
|
|
|
|
workspace_backup .bin
|
|
|
|
workspace_link bin .bin
|
|
|
|
|
2021-04-06 19:56:10 +00:00
|
|
|
# ALACRITTY
|
|
|
|
workspace_backup .alacritty.yml
|
|
|
|
workspace_link alacritty/alacritty.yml .alacritty.yml
|
|
|
|
|
2021-11-23 19:36:10 +00:00
|
|
|
# KITTY
|
|
|
|
workspace_backup .config/kitty/kitty.conf
|
|
|
|
workspace_link kitty/kitty.conf .config/kitty/kitty.conf
|
|
|
|
|
2021-03-20 22:36:25 +00:00
|
|
|
# VIM
|
|
|
|
workspace_backup .vimrc
|
|
|
|
workspace_link vim/vimrc .vimrc
|
|
|
|
workspace_backup .vim/coc-settings.json
|
|
|
|
workspace_link vim/coc-settings.json .vim/coc-settings.json
|