From a5f8fc27c93c527600291d7193f57d77e1379568 Mon Sep 17 00:00:00 2001 From: linsilence Date: Mon, 10 Jun 2019 19:22:10 +0800 Subject: [PATCH] update .zshrc when upgrade --- tools/upgrade.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index d234c7f88..72a4e2fb2 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -24,6 +24,14 @@ printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh" cd "$ZSH" if git pull --rebase --stat origin master then + printf '%s\n' 'update .zshrc' + cp "$ZSH/templates/zshrc.zsh-template" ~/.zshrc + sed "/^export ZSH=/ c\\ +export ZSH=\"$ZSH\" +" ~/.zshrc > ~/.zshrc-omztemp + mv -f ~/.zshrc-omztemp ~/.zshrc + printf '%s\n' 'update .zshrc' + printf '%s' "$GREEN" printf '%s\n' ' __ __ ' printf '%s\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '