2021-04-01 20:32:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Set up basic symlinks and directory structure when installing dotfiles.
|
2021-04-02 21:14:08 +00:00
|
|
|
# Expected to be idempotent.
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# General
|
|
|
|
mkdir -p $HOME/dev
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/script $HOME/script
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
# ZSH
|
|
|
|
mkdir -p $HOME/.config/zsh/functions
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/zshenv $HOME/.zshenv
|
|
|
|
ln -sfn $HOME/dev/dotfiles/zshrc $HOME/.config/zsh/.zshrc
|
2021-04-01 20:32:07 +00:00
|
|
|
|
2021-04-05 10:07:51 +00:00
|
|
|
secretsfile="$HOME/.config/zsh/.zshsecrets"
|
|
|
|
if [ ! -f "$secretsfile" ]; then
|
|
|
|
cp $HOME/dev/dotfiles/zshsecrets.example "$secretsfile"
|
|
|
|
fi
|
|
|
|
|
2021-04-01 20:32:07 +00:00
|
|
|
# Tmux
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/tmux.conf $HOME/.tmux.conf
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
# Vim
|
|
|
|
mkdir -p $HOME/.vim/pack/git-plugins/{opt,start}
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/vimrc $HOME/.vimrc
|
|
|
|
ln -sfn $HOME/dev/dotfiles/vim/after $HOME/.vim/after
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
# Git
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/gitconfig $HOME/.gitconfig
|
2021-04-01 20:32:07 +00:00
|
|
|
mkdir -p $HOME/.config/git
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/gitignore $HOME/.config/git/ignore
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
# Alacritty
|
2021-04-02 21:14:08 +00:00
|
|
|
ln -sfn $HOME/dev/dotfiles/alacritty.yml $HOME/.config/alacritty.yml
|
2021-04-01 20:32:07 +00:00
|
|
|
|
|
|
|
echo "Done"
|