1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-25 01:47:25 +08:00

Compare commits

..

No commits in common. "ce28ac42c8e9933b1b3ca041bed0a3f1140eada2" and "6152ac30bede172ba0422a8610dc796948ae1546" have entirely different histories.

3 changed files with 11 additions and 12 deletions

View File

@ -19,13 +19,13 @@ function current_epoch() {
echo $(( EPOCHSECONDS / 60 / 60 / 24 )) echo $(( EPOCHSECONDS / 60 / 60 / 24 ))
} }
function update_last_updated_file() { function update_last-updated_file() {
echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update" echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update"
} }
function update_ohmyzsh() { function update_ohmyzsh() {
ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh" ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh"
update_last_updated_file update_last-updated_file
} }
() { () {
@ -55,7 +55,7 @@ function update_ohmyzsh() {
# Create or update .zsh-update file if missing or malformed # Create or update .zsh-update file if missing or malformed
if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then
update_last_updated_file update_last-updated_file
return return
fi fi
@ -79,10 +79,10 @@ function update_ohmyzsh() {
read -r -k 1 option read -r -k 1 option
[[ "$option" != $'\n' ]] && echo [[ "$option" != $'\n' ]] && echo
case "$option" in case "$option" in
[yY$'\n']) update_ohmyzsh ;; [nN]) update_last-updated_file ;;
[nN]) update_last_updated_file ;; *) update_ohmyzsh ;;
esac esac
fi fi
} }
unset -f current_epoch update_last_updated_file update_ohmyzsh unset -f current_epoch update_last-updated_file update_ohmyzsh

View File

@ -269,11 +269,11 @@ main() {
/____/ ....is now installed! /____/ ....is now installed!
Before your scream Oh My Zsh! please look over the ~/.zshrc file to select plugins, themes, and options. Please look over the ~/.zshrc file to select plugins, themes, and options.
• Follow us on Twitter: https://twitter.com/ohmyzsh p.s. Follow us on https://twitter.com/ohmyzsh
• Join our Discord server: https://discord.gg/ohmyzsh
• Get stickers, shirts, coffee mugs and other swag: https://shop.planetargon.com/collections/oh-my-zsh p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh
EOF EOF
printf "$RESET" printf "$RESET"

View File

@ -62,8 +62,7 @@ then
printf '%s\____/%s_/ /_/ %s /_/ /_/ /_/%s\__, / %s /___/%s____/%s_/ /_/ %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET printf '%s\____/%s_/ /_/ %s /_/ /_/ /_/%s\__, / %s /___/%s____/%s_/ /_/ %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
printf '%s %s %s %s /____/ %s %s %s %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET printf '%s %s %s %s /____/ %s %s %s %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version."
printf "${BLUE}${BOLD}%s${RESET}\n" "To keep up on the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh" printf "${BLUE}${BOLD}%s${RESET}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
printf "${BLUE}${BOLD}%s${RESET}\n" "Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh"
printf "${BLUE}${BOLD}%s${RESET}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh" printf "${BLUE}${BOLD}%s${RESET}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh"
else else
printf "${RED}%s${RESET}\n" 'There was an error updating. Try again later?' printf "${RED}%s${RESET}\n" 'There was an error updating. Try again later?'