dotfiles/setup.sh
2023-04-17 21:20:15 -05:00

21 lines
451 B
Bash
Executable File

#/usr/bin/env bash
# Setup script.
if [[ ! -d "$HOME/.zsh" ]]; then
git clone --recurse-submodules https://github.com/kreeger/zshrc.git $HOME/.zsh
fi
if [[ ! -a "$HOME/.zshrc" ]]; then
ln -sfv $HOME/.zsh/zshrc $HOME/.zshrc
fi
# Link dotfiles.
declare -a dotfiles=("gemrc" "gitconfig" "gitignore.global")
for file in "${dotfiles[@]}"
do
if [[ ! -a "$HOME/.$file" ]]; then
ln -sfv $HOME/.dotfiles/.$file $HOME/.$file
fi
done