Fix the diff and add a line to rename existing files
This commit is contained in:
parent
e8427ff642
commit
9e60593a84
10
setup.sh
10
setup.sh
@ -30,6 +30,7 @@ function install_build_tools() {
|
|||||||
function setup_neovim() {
|
function setup_neovim() {
|
||||||
# Set up Neovim
|
# Set up Neovim
|
||||||
if [[ -d "$HOME/.config/nvim" ]]; then
|
if [[ -d "$HOME/.config/nvim" ]]; then
|
||||||
|
echo "Neovim already installed, skipping setup"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo "Setting up neovim..."
|
echo "Setting up neovim..."
|
||||||
@ -44,6 +45,10 @@ function setup_neovim() {
|
|||||||
|
|
||||||
function setup_git() {
|
function setup_git() {
|
||||||
# Set up Git
|
# Set up Git
|
||||||
|
if [[ -f "$HOME/.gitconfig" ]]; then
|
||||||
|
echo "Git already installed, skipping"
|
||||||
|
return
|
||||||
|
fi
|
||||||
echo "Setting up git..."
|
echo "Setting up git..."
|
||||||
check_or_install git git
|
check_or_install git git
|
||||||
git config --global alias.co checkout
|
git config --global alias.co checkout
|
||||||
@ -64,14 +69,13 @@ function setup_git() {
|
|||||||
function setup_zsh() {
|
function setup_zsh() {
|
||||||
# Set up ZSH
|
# Set up ZSH
|
||||||
if [[ -d "$HOME/.zprezto" ]]; then
|
if [[ -d "$HOME/.zprezto" ]]; then
|
||||||
|
echo "Prezto already installed, skipping"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo "Setting up zsh..."
|
echo "Setting up zsh..."
|
||||||
check_or_install zsh zsh
|
check_or_install zsh zsh
|
||||||
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
|
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
|
||||||
if [[ -f "$HOME/.zshrc" ]]; then
|
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'
|
||||||
mv "$HOME/.zshrc" "$HOME/.zshrc.original"
|
|
||||||
fi
|
|
||||||
zsh -c 'setopt EXTENDED_GLOB; for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"; 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
|
cd $HOME
|
||||||
patch -p0 < $DIR/zsh/prezto.diff
|
patch -p0 < $DIR/zsh/prezto.diff
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff --git zpreztorc zpreztorc
|
diff --git .zprezto/runcoms/zpreztorc .zprezto/runcoms/zpreztorc
|
||||||
index ae68a89..2c1e405 100644
|
index ae68a89..2c1e405 100644
|
||||||
--- zpreztorc
|
--- .zprezto/runcoms/zpreztorc
|
||||||
+++ zpreztorc
|
+++ .zprezto/runcoms/zpreztorc
|
||||||
@@ -38,8 +38,11 @@ zstyle ':prezto:load' pmodule \
|
@@ -38,8 +38,11 @@ zstyle ':prezto:load' pmodule \
|
||||||
'spectrum' \
|
'spectrum' \
|
||||||
'utility' \
|
'utility' \
|
||||||
@ -83,10 +83,10 @@ index ae68a89..2c1e405 100644
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Tmux
|
# Tmux
|
||||||
diff --git zshrc zshrc
|
diff --git .zprezto/runcoms/zshrc .zprezto/runcoms/zshrc
|
||||||
index 039b882..58f1b30 100644
|
index 039b882..58f1b30 100644
|
||||||
--- zshrc
|
--- .zprezto/runcoms/zshrc
|
||||||
+++ zshrc
|
+++ .zprezto/runcoms/zshrc
|
||||||
@@ -10,4 +10,11 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
@@ -10,4 +10,11 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user