Update setup script

This commit is contained in:
Ben Kreeger 2023-04-17 21:20:15 -05:00
parent 8c696a7b6f
commit 35f3b784ad
Signed by: kreeger
GPG Key ID: 1F33DAF2F49E4046

19
setup.sh Normal file → Executable file
View File

@ -1,5 +1,20 @@
#/usr/bin/env bash
# Setup script.
git clone --recurse-submodules https://github.com/kreeger/zshrc.git $HOME/.zsh
ln -sfv $HOME/.zsh/zshrc $HOME/.zshrc
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