diff --git a/my-home/dot-zshrc b/my-home/dot-zshrc index 3aae61c..d8719f4 100644 --- a/my-home/dot-zshrc +++ b/my-home/dot-zshrc @@ -1,4 +1,5 @@ # automatically run `zgenom reset` if we modify our .zshrc +ZGEN_COMPINIT_FLAGS="-u" ZGEN_RESET_ON_CHANGE=("${HOME}/.zshrc") # load zgenom diff --git a/scripts/mac.sh b/scripts/mac.sh index 54027fc..b00f00b 100755 --- a/scripts/mac.sh +++ b/scripts/mac.sh @@ -6,11 +6,15 @@ source "$DOTFILES_DIR/scripts/utils.sh" print_details "$SYSTEM" +sudo rm -rf /Library/Developer/CommandLineTools +sudo xcode-select --install + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -brew install neovim fzf starship stow gpg +brew doctor +brew cleanup -chsh -s /bin/zsh +brew install neovim fzf starship stow gpg git submodule init git submodule update diff --git a/scripts/nas.sh b/scripts/nas.sh index a81441a..2074179 100755 --- a/scripts/nas.sh +++ b/scripts/nas.sh @@ -2,13 +2,15 @@ SYSTEM="NAS" DOTFILES_DIR=$(pwd) -source utils.sh +source "$DOTFILES_DIR/scripts/utils.sh" print_details function stow(){ for f in $1/*; do - ln -sf $f $2/$(echo $(basename $f) | sed -r 's/dot-/./') + link="$2/$(echo $(basename $f) | sed -r 's/dot-/./')" + unlink $link + ln -sf $f $link done return 0 diff --git a/scripts/utils.sh b/scripts/utils.sh index 472efa4..c9d62e4 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -88,9 +88,12 @@ function sudo_rule(){ # setup fzf function fzf_install(){ mkdir -p $HOME/.local/bin + rm -rf $HOME/.fzf git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf - ./$HOME/.fzf/install --bin - cp $HOME/fzf/bin* $HOME/.local/bin/ + cd $HOME/.fzf + ./install --bin + cp bin/* $HOME/.local/bin/ + cd - } # install lazygit