1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:40:06 +08:00

urlescape spaces in font names (#3042)

Fixes #2532 

Also cleans up empty files so rerunning install.sh gets existing users in a good state
This commit is contained in:
Eric Drechsel 2019-09-11 06:29:09 -07:00 committed by Wang Shidong
parent 2f1a4a56ae
commit 748ba30908

View File

@ -337,8 +337,13 @@ welcome () {
# download_font {{{ # download_font {{{
download_font () { download_font () {
url="https://raw.githubusercontent.com/wsdjeg/DotFiles/master/local/share/fonts/$1" url="https://raw.githubusercontent.com/wsdjeg/DotFiles/master/local/share/fonts/${1// /%20}"
path="$HOME/.local/share/fonts/$1" path="$HOME/.local/share/fonts/$1"
# Clean up after https://github.com/SpaceVim/SpaceVim/issues/2532
if [[ -f "$path" && ! -s "$path" ]]
then
rm "$path"
fi
if [[ -f "$path" ]] if [[ -f "$path" ]]
then then
success "Downloaded $1" success "Downloaded $1"