Updated install.sh to be better?

This commit is contained in:
acicchetti 2018-05-31 10:23:47 -04:00
parent 9c76bd83c5
commit f9d08546e9
2 changed files with 10 additions and 6 deletions

View file

@ -1,9 +1,10 @@
#!/usr/bin/env zsh
#iosevka - possibly using a helper tool? #iosevka - possibly using a helper tool?
printf "\e[32mMake sure to install Iosevka font\n\e[0m" printf "\e[32mMake sure to install Iosevka font\n\e[0m"
#pyenv $PATH - part of .zshenv #pyenv $PATH - part of .zshenv
printf "\e[32mInstall pyenv if you want it\n\e[0m" printf "\e[32mInstall pyenv if you want it\n\e[0m"
#thefuck $PATH - pip install thefuck #thefuck $PATH - pip install thefuck
if [[ $(hash thefuck; echo $?) != 0 ]] if [[ ! (-x "$(command -v thefuck)") ]]
then then
pip install thefuck pip install thefuck
fi fi
@ -13,19 +14,19 @@ then
git clone https://github.com/zsh-users/antigen.git ~/.antigen git clone https://github.com/zsh-users/antigen.git ~/.antigen
fi fi
#nvim $PATH - pkgmngr install nvim/neovim #nvim $PATH - pkgmngr install nvim/neovim
if [[ $(hash nvim; echo $?) != 0 ]] if [[ ! ( -x "$(command -v nvim)") ]]
then then
if [[ ($(uname) -eq "Darwin") && ( $(hash brew; echo $?) != 0 ) ]] if [[ ($(uname) -eq "Darwin") && ( $(command -v brew; echo $?) == 0 ) ]]
then then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install neovim brew install neovim
elif [[ $(hash pacman; echo $?) == 0 ]] elif [[ ! ( -x "$(command -v pacman)") ]]
then then
pacman -Sy neovim pacman -Sy neovim
elif [[ $(hash apt-get; echo $?) == 0 ]] elif [[ ! ( -x "$(command -v apt-get)") ]]
then then
apt-get install neovim apt-get install neovim
elif [[ $(hash pacman; echo $?) == 0 ]] elif [[ ! ( -x "$(command -v dnf)") ]]
then then
dnf install neovim dnf install neovim
else else

View file

@ -6,6 +6,9 @@ setopt appendhistory extendedglob nomatch notify
unsetopt autocd beep unsetopt autocd beep
bindkey -e bindkey -e
#keybindings
fpath=(~/bin $fpath)
zstyle :compinstall filename '/home/anthonys/.zshrc' zstyle :compinstall filename '/home/anthonys/.zshrc'
zstyle ":completion:*" complete _complete _ignored _approximate zstyle ":completion:*" complete _complete _ignored _approximate
zstyle ":completion:*" glob 1 zstyle ":completion:*" glob 1