Fix font download error.

Downloading MesloLGS NF Regular.ttf ... ERROR

Command: curl -fsSL -o /Users/weiwei/Library/Fonts/MesloLGS\ NF\ Regular.ttf.tmp https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
This commit is contained in:
weiwei 2023-08-22 11:23:34 +08:00
parent f04ce05d92
commit a4557464be
1 changed files with 7 additions and 0 deletions

View File

@ -518,6 +518,13 @@ function install_font() {
local style
for style in Regular Bold Italic 'Bold Italic'; do
local file="MesloLGS NF ${style}.ttf"
print "$file ==Ready to download=="
if [[ -f ~"/Library/Fonts/$file" ]]; then
print "$file ==Already exist=="
continue
fi
run_command "Downloading %B$file%b" \
curl -fsSL -o ~/Library/Fonts/$file.tmp "$font_base_url/${file// /%20}"
command mv -f -- ~/Library/Fonts/$file{.tmp,} || quit -c