sync
This commit is contained in:
parent
c17582a528
commit
48151a36ec
13
setup_zsh.sh
13
setup_zsh.sh
|
@ -12,9 +12,13 @@ command="$0"
|
|||
root="$HOME/.dotfiles"
|
||||
plugins="$root/zsh"
|
||||
timestamp=$(date +"%Y%m%d%H%M")
|
||||
repo="https://socialg.it/david/dotfiles.git"
|
||||
dependencies="awk tee ls git wget curl rm mv sleep date"
|
||||
debug=1
|
||||
dependencies="awk tee ls git wget curl rm mv sleep date"
|
||||
if [ $(uname) == "Darwin" ]; then
|
||||
alias sed="gsed"
|
||||
#TODO: check if gsed is there first
|
||||
fi
|
||||
|
||||
|
||||
# **** functions ****
|
||||
message() {
|
||||
|
@ -97,7 +101,7 @@ curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh
|
|||
message i "oh-my-zsh installed"
|
||||
|
||||
# set $ZSH_THEME="" in .zshrc
|
||||
cat $HOME/.zshrc | sed "s/^ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"\"/g" > $HOME/.zshrc
|
||||
sed -i "s/^ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"\"/g" $HOME/.zshrc
|
||||
message i "oh-my-zsh theme deactivated"
|
||||
|
||||
# clone plugins
|
||||
|
@ -114,7 +118,8 @@ message i "all plugins cloned"
|
|||
|
||||
# set $plugins in .zshrc
|
||||
plugins="git zsh-autosuggestions autoupdate sysadmin-util zsh-syntax-highlighting zsh-david async pure"
|
||||
cat $HOME/.zshrc | sed "/plugins=(/,/)/d; s/source \$ZSH\/oh-my-zsh.sh/plugins=($plugins);; source \$ZSH\/oh-my-zsh.sh/g" | sed $'s/;; /\\\n/g' > $HOME/.zshrc
|
||||
sed -i "/plugins=(/,/)/d; s/source \$ZSH\/oh-my-zsh.sh/plugins=($plugins);; source \$ZSH\/oh-my-zsh.sh/g" $HOME/.zshrc
|
||||
sed -i $'s/;; /\\\n/g' $HOME/.zshrc
|
||||
message i "activated zsh plugins [$plugins]"
|
||||
|
||||
message d "Installer finished."
|
||||
|
|
Loading…
Reference in New Issue