From 27563b48089d0b76cb9ac3e9f23c63343797d871 Mon Sep 17 00:00:00 2001 From: tblyler Date: Mon, 25 May 2020 13:56:17 -0400 Subject: [PATCH] Fix some install errors --- home/.zshrc.d/02_upgrade_system.sh | 3 ++- install.sh | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/home/.zshrc.d/02_upgrade_system.sh b/home/.zshrc.d/02_upgrade_system.sh index ce5921a..c2894d1 100755 --- a/home/.zshrc.d/02_upgrade_system.sh +++ b/home/.zshrc.d/02_upgrade_system.sh @@ -64,4 +64,5 @@ upgrade_system() { if [ -n "${TMUX}" ]; then tmux source-file "${HOME}/.tmux.conf" fi - ) || return $? + ) +} diff --git a/install.sh b/install.sh index 842feaf..b76e6fd 100755 --- a/install.sh +++ b/install.sh @@ -45,13 +45,21 @@ install_ohmyzsh() { install_custom_ohmyzsh_plugins() { local REPOS=( https://github.com/zsh-users/zsh-autosuggestions + https://github.com/zsh-users/zsh-syntax-highlighting ) local REPO + local ZSH_CUSTOM_DEST for REPO in ${REPOS[*]}; do + ZSH_CUSTOM_DEST="${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/$(basename "${REPO}")" + + if [ -d "${ZSH_CUSTOM_DEST}" ]; then + continue + fi + git clone \ "${REPO}" \ - "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" || exit $? + "${ZSH_CUSTOM_DEST}" || exit $? done } @@ -65,6 +73,7 @@ install_tmux_conf() { set -e cd git clone https://github.com/gpakosz/.tmux.git + ln -s .tmux/.tmux.conf ./ ) }