From 125434d557cb671f82b360d2ecede3b28976c891 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Tue, 3 Jun 2025 09:23:48 -0500 Subject: [PATCH] Clean things up a bit --- .gemrc => gemrc | 0 .gitconfig => gitconfig | 0 .gitignore.global => gitignore.global | 0 .mackup.cfg => mackup.cfg | 0 setup.sh | 18 +++++++++++------- 5 files changed, 11 insertions(+), 7 deletions(-) rename .gemrc => gemrc (100%) rename .gitconfig => gitconfig (100%) rename .gitignore.global => gitignore.global (100%) rename .mackup.cfg => mackup.cfg (100%) diff --git a/.gemrc b/gemrc similarity index 100% rename from .gemrc rename to gemrc diff --git a/.gitconfig b/gitconfig similarity index 100% rename from .gitconfig rename to gitconfig diff --git a/.gitignore.global b/gitignore.global similarity index 100% rename from .gitignore.global rename to gitignore.global diff --git a/.mackup.cfg b/mackup.cfg similarity index 100% rename from .mackup.cfg rename to mackup.cfg diff --git a/setup.sh b/setup.sh index ba7301c..baf69ce 100755 --- a/setup.sh +++ b/setup.sh @@ -1,15 +1,19 @@ #!/usr/bin/env bash -# Setup script. -if [[ ! -d "$HOME/.zsh" ]]; then - git clone --recurse-submodules https://git.kree.gr/kreeger/zshrc.git $HOME/.zsh - ln -sfv $HOME/.zsh/zshrc $HOME/.zshrc -fi - +# Make sure $HOME/.config exists. It should, if we've been cloned there! if [[ ! -d "$HOME/.config" ]]; then mkdir -p $HOME/.config fi +# Clone ZSH configs. +if [[ ! -d "$HOME/.config/zsh" ]]; then + git clone --recurse-submodules https://git.kree.gr/kreeger/zshrc.git $HOME/.config/zsh +fi + +if [[ ! -a "$HOME/.zshrc" ]]; then + ln -sfv $HOME/.config/zsh/zshrc $HOME/.zshrc +fi + # Clone nvim configs. if [[ ! -d "$HOME/.config/nvim" ]]; then git clone --recurse-submodules https://git.kree.gr/kreeger/nvimrc.git $HOME/.config/nvim @@ -29,6 +33,6 @@ SCRIPTPATH=$(dirname "$SCRIPT") for file in "${dotfiles[@]}" do if [[ ! -a "$HOME/.$file" ]]; then - ln -sfv $SCRIPTPATH/.$file $HOME/.$file + ln -sfv $SCRIPTPATH/$file $HOME/.$file fi done