Skip to content

Commit

Permalink
Use $HOME over ~.
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed May 13, 2015
1 parent 2cee20d commit 637a4be
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
38 changes: 19 additions & 19 deletions bootstrap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,48 @@ function puts () {
echo "\n-- [$1] $2"
}

if ! [[ -e ~/.gemrc ]]; then
echo 'gem: --no-document' > ~/.gemrc
if ! [[ -e $HOME/.gemrc ]]; then
echo 'gem: --no-document' > $HOME/.gemrc
puts 'Created' '~/.gemrc'
fi

if ! [[ -d ~/.zgen.zsh ]]; then
if ! [[ -d $HOME/.zgen.zsh ]]; then
puts 'Installing' 'zshrc'
curl -L https://rc.evansosenko.com/zshrc/install.sh | sh
fi

if [[ -d ~/.zgen.zsh ]]; then
if [[ -d $HOME/.zgen.zsh ]]; then
puts 'Installed' 'zshrc'
fi

if ! [[ -d ~/.rbenv ]]; then
if ! [[ -d $HOME/.rbenv ]]; then
puts 'Installing' 'rbenv'
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/rbenv.git $HOME/.rbenv
fi

if [[ -d ~/.rbenv ]]; then
if [[ -d $HOME/.rbenv ]]; then
puts 'Installed' 'rbenv'
fi

if ! [[ -d ~/.rbenv/plugins/ruby-build ]]; then
if ! [[ -d $HOME/.rbenv/plugins/ruby-build ]]; then
puts 'Installing' 'ruby-build'
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build
fi

if [[ -d ~/.rbenv/plugins/ruby-build ]]; then
if [[ -d $HOME/.rbenv/plugins/ruby-build ]]; then
puts 'Installed' 'ruby-build'
fi

if ! [[ -d ~/.vim/bundle/vimrc ]]; then
if ! [[ -d $HOME/.vim/bundle/vimrc ]]; then
puts 'Installing' 'vimrc'
curl -L https://rc.evansosenko.com/vimrc/install.sh | sh
fi

if [[ -d ~/.vim/bundle/vimrc ]]; then
if [[ -d $HOME/.vim/bundle/vimrc ]]; then
puts 'Installed' 'vimrc'
fi

if ! [[ -d ~/.tmux/plugins/tmuxrc ]]; then
if ! [[ -d $HOME/.tmux/plugins/tmuxrc ]]; then
if [[ -n "$TMUX" ]]; then
puts 'Installing' 'tmuxrc'
curl -L https://rc.evansosenko.com/tmuxrc/install.sh | sh
Expand All @@ -57,27 +57,27 @@ if ! [[ -d ~/.tmux/plugins/tmuxrc ]]; then
fi
fi

if [[ -d ~/.tmux/plugins/tmuxrc ]]; then
if [[ -d $HOME/.tmux/plugins/tmuxrc ]]; then
puts 'Installed' 'tmuxrc'
fi

if ! [[ -e ~/.promptline.zsh ]]; then
if [[ -d ~/.vim/bundle/promptline.vim ]]; then
if ! [[ -e $HOME/.promptline.zsh ]]; then
if [[ -d $HOME/.vim/bundle/promptline.vim ]]; then
puts 'Note' 'To install promptline, open vim and run:'
echo ":PromptlineSnapshot ~/.promptline.zsh"
fi
fi

if [[ -e ~/.promptline.zsh ]]; then
if [[ -e $HOME/.promptline.zsh ]]; then
puts 'Installed' 'promptline'
fi

if ! [[ -e ~/.tmuxline.conf ]] then
if ! [[ -e $HOME/.tmuxline.conf ]] then
puts 'Note' 'To install tmuxline, while in a tmux session open vim and run:'
echo ":TmuxlineSnapshot ~/.tmuxline.conf"
fi

if [[ -e ~/.tmuxline.conf ]]; then
if [[ -e $HOME/.tmuxline.conf ]]; then
puts 'Installed' 'tmuxline'
fi

Expand Down
16 changes: 8 additions & 8 deletions update.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ function puts () {
echo "\n-- [$1] $2"
}

if [[ -d ~/.zgen.zsh ]]; then
if [[ -d $HOME/.zgen.zsh ]]; then
puts 'Updating' 'zgen'
cd ~/.zgen.zsh
cd $HOME/.zgen.zsh
git pull
fi

if [[ -d ~/.rbenv ]]; then
if [[ -d $HOME/.rbenv ]]; then
puts 'Updating' 'rbenv'
cd ~/.rbenv
cd $HOME/.rbenv
git pull
fi

if [[ -d ~/.rbenv/plugins/ruby-build ]]; then
if [[ -d $HOME/.rbenv/plugins/ruby-build ]]; then
puts 'Updating' 'ruby-build'
cd ~/.rbenv/plugins/ruby-build
cd $HOME/.rbenv/plugins/ruby-build
git pull
fi

if [[ -e ~/.promptline.zsh ]]; then
if [[ -e $HOME/.promptline.zsh ]]; then
puts 'Note' 'To update promptline, open vim and run:'
echo ":PromptlineSnapshot! ~/.promptline.zsh"
fi

if [[ -e ~/.tmuxline.conf ]]; then
if [[ -e $HOME/.tmuxline.conf ]]; then
puts 'Note' 'To update tmuxline, while in a tmux session open vim and run:'
echo ":TmuxlineSnapshot! ~/.tmuxline.conf"
fi
Expand Down

0 comments on commit 637a4be

Please sign in to comment.