39 lines
962 B
Bash
Executable File
39 lines
962 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Set up basic symlinks and directory structure when installing dotfiles.
|
|
# Expected to be idempotent.
|
|
|
|
set -e
|
|
|
|
# General
|
|
mkdir -p $HOME/dev
|
|
ln -sfn $HOME/dev/dotfiles/script $HOME/script
|
|
|
|
# ZSH
|
|
mkdir -p $HOME/.config/zsh/functions
|
|
ln -sfn $HOME/dev/dotfiles/zshenv $HOME/.zshenv
|
|
ln -sfn $HOME/dev/dotfiles/zshrc $HOME/.config/zsh/.zshrc
|
|
|
|
secretsfile="$HOME/.config/zsh/.zshsecrets"
|
|
if [ ! -f "$secretsfile" ]; then
|
|
cp $HOME/dev/dotfiles/zshsecrets.example "$secretsfile"
|
|
fi
|
|
|
|
# Tmux
|
|
ln -sfn $HOME/dev/dotfiles/tmux.conf $HOME/.tmux.conf
|
|
|
|
# Vim
|
|
mkdir -p $HOME/.vim/pack/git-plugins/{opt,start}
|
|
ln -sfn $HOME/dev/dotfiles/vimrc $HOME/.vimrc
|
|
ln -sfn $HOME/dev/dotfiles/vim/after $HOME/.vim/after
|
|
|
|
# Git
|
|
ln -sfn $HOME/dev/dotfiles/gitconfig $HOME/.gitconfig
|
|
mkdir -p $HOME/.config/git
|
|
ln -sfn $HOME/dev/dotfiles/gitignore $HOME/.config/git/ignore
|
|
|
|
# Alacritty
|
|
ln -sfn $HOME/dev/dotfiles/alacritty.yml $HOME/.config/alacritty.yml
|
|
|
|
echo "Done"
|