Fix the diff and add a line to rename existing files

This commit is contained in:
Raoul Snyman 2023-07-10 10:45:46 -07:00
parent e8427ff642
commit 9e60593a84
Signed by: raoul
GPG Key ID: F55BCED79626AE9C
2 changed files with 13 additions and 9 deletions

View File

@ -30,6 +30,7 @@ function install_build_tools() {
function setup_neovim() {
# Set up Neovim
if [[ -d "$HOME/.config/nvim" ]]; then
echo "Neovim already installed, skipping setup"
return
fi
echo "Setting up neovim..."
@ -44,6 +45,10 @@ function setup_neovim() {
function setup_git() {
# Set up Git
if [[ -f "$HOME/.gitconfig" ]]; then
echo "Git already installed, skipping"
return
fi
echo "Setting up git..."
check_or_install git git
git config --global alias.co checkout
@ -64,14 +69,13 @@ function setup_git() {
function setup_zsh() {
# Set up ZSH
if [[ -d "$HOME/.zprezto" ]]; then
echo "Prezto already installed, skipping"
return
fi
echo "Setting up zsh..."
check_or_install zsh zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
if [[ -f "$HOME/.zshrc" ]]; then
mv "$HOME/.zshrc" "$HOME/.zshrc.original"
fi
zsh -c 'setopt EXTENDED_GLOB; for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do if [[ -f "${ZDOTDIR:-$HOME}/.${rcfile:t}" ]]; then mv "${ZDOTDIR:-$HOME}/.${rcfile:t}" "${ZDOTDIR:-$HOME}/.${rcfile:t}.orig"; fi; done'
zsh -c 'setopt EXTENDED_GLOB; for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"; done'
cd $HOME
patch -p0 < $DIR/zsh/prezto.diff

View File

@ -1,7 +1,7 @@
diff --git zpreztorc zpreztorc
diff --git .zprezto/runcoms/zpreztorc .zprezto/runcoms/zpreztorc
index ae68a89..2c1e405 100644
--- zpreztorc
+++ zpreztorc
--- .zprezto/runcoms/zpreztorc
+++ .zprezto/runcoms/zpreztorc
@@ -38,8 +38,11 @@ zstyle ':prezto:load' pmodule \
'spectrum' \
'utility' \
@ -83,10 +83,10 @@ index ae68a89..2c1e405 100644
#
# Tmux
diff --git zshrc zshrc
diff --git .zprezto/runcoms/zshrc .zprezto/runcoms/zshrc
index 039b882..58f1b30 100644
--- zshrc
+++ zshrc
--- .zprezto/runcoms/zshrc
+++ .zprezto/runcoms/zshrc
@@ -10,4 +10,11 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi