Skip to content

Commit bd91c66

Browse files
zanothisnebenjamin
authored andcommitted
Update install script and .zshrc
Issue ID: #1
1 parent 719f248 commit bd91c66

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
install_log.txt
2+
antigen.zsh

.zshrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Antigen Config
2-
source /usr/share/zsh/share/antigen.zsh
2+
source $HOME/.config/zsh/antigen.zsh
33

44
antigen bundle zsh-users/zsh-syntax-highlighting
55

@@ -28,10 +28,6 @@ export SAVEHIST=500
2828
setopt CORRECT
2929
setopt DVORAK
3030

31-
export SHELL=/usr/bin/zsh
32-
3331
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
3432

35-
source /home/nathan/.dvm/dvm.sh
36-
3733
alias ls="ls -la"

install.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ else
8181
fi
8282

8383
if [ ! -d $HOME/dotfiles ]; then
84-
log "Installing dotfiles...\n${INDENT}Cloning into dotfiles..."
84+
log "Installing dotfiles.......\n${INDENT}Cloning into dotfiles..."
8585
git clone https://github.com/zanothis/setup.git $HOME/dotfiles >> $LOG 2>&1
8686
status_out
87-
if [ $? -ne 0 ]; then
87+
if [ $? -eq 0 ]; then
8888
log "\n${INDENT}Linking dotfiles to \"$HOME\"..."
8989
#log "\n${INDENT}${INDENT}Linking .screenrc....."
9090
#ln -s $HOME/dotfiles/.screenrc $HOME/.screenrc
9191
#log "$CHECK\n${INDENT}${INDENT}Linking .inputrc......"
9292
#ln -s $HOME/dotfiles/.inputrc $HOME/.inputrc
9393
log "$CHECK\n${INDENT}${INDENT}Linking configs......."
94+
mv $HOME/.config $HOME/.config.bak
95+
mv $HOME/.i3 $HOME/.i3.bak
9496
cp -sbr $HOME/dotfiles/.config $HOME/.config
9597
cp -sbr $HOME/.config/i3 $HOME/.i3
9698
log "$CHECK\n${INDENT}${INDENT}Linking .vimrc........"
@@ -100,6 +102,7 @@ if [ ! -d $HOME/dotfiles ]; then
100102
log "$CHECK\n${INDENT}${INDENT}Linking .gitmessage..."
101103
ln -s $HOME/dotfiles/.gitmessage $HOME/.gitmessage
102104
log "$CHECK\n${INDENT}${INDENT}Linking .zshrc........"
105+
mv $HOME/.zshrc $HOME/.zshrc.bak
103106
ln -s $HOME/dotfiles/.zshrc $HOME/.zshrc
104107
logn $CHECK
105108
fi
@@ -111,6 +114,17 @@ else
111114
cd $ORIGIN
112115
fi
113116

117+
log "Checking for Antigen"
118+
if [ ! -f $HOME/dotfiles/antigen.zsh ]; then
119+
log "\n${INDENT}Installing Antigen......"
120+
curl -L git.io/antigen > $HOME/dotfiles/antigen.zsh 2>&1
121+
status_out
122+
log "${INDENT}Linking antigen.zsh....."
123+
mkdir -p $HOME/.config/zsh/
124+
ln -s $HOME/dotfiles/antigen.zsh $HOME/.config/zsh/antigen.zsh
125+
status_out
126+
fi
127+
114128
if [ ! -f $HOME/.vim/autoload/plug.vim ]; then
115129
log "Installing plug-vim......."
116130
curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@@ -120,6 +134,8 @@ if [ ! -f $HOME/.vim/autoload/plug.vim ]; then
120134
status_out
121135
fi
122136

123-
log "Activating zsh............"
124-
chsh -s $(which zsh)
125-
status_out
137+
if [ $SHELL != "/usr/bin/zsh" ]; then
138+
log "Activating zsh............"
139+
chsh -s $(which zsh)
140+
status_out
141+
fi

0 commit comments

Comments
 (0)