-
-
Save lucasdavila/3875946 to your computer and use it in GitHub Desktop.
# to execute this gist, run the line bellow in terminal | |
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh |
version=1.010 | |
echo "\n* Downloading version $version of source code pro font" | |
rm -f SourceCodePro_FontsOnly-$version.zip | |
rm -rf SourceCodePro_FontsOnly-$version | |
wget https://github.com/downloads/adobe/source-code-pro/SourceCodePro_FontsOnly-$version.zip -O SourceCodePro_FontsOnly-$version.zip | |
echo "\n* Unziping package" | |
unzip SourceCodePro_FontsOnly-$version.zip | |
mkdir -p ~/.local/share/fonts | |
echo "\n* Copying fonts to ~/.local/share/fonts/" | |
cp SourceCodePro_FontsOnly-$version/OTF/*.otf ~/.local/share/fonts/ | |
echo "\n* Updating font cache" | |
sudo fc-cache -f -v | |
echo "\n* Looking for 'Source Code Pro' in installed fonts" | |
fc-list | grep "Source Code Pro" | |
echo "\n* Now, you can use the 'Source Code Pro' fonts, ** for sublime text ** just add the lines bellow to 'Preferences > Settings':" | |
echo '\n "font_face": "Source Code Pro",' | |
echo ' "font_size": 10' | |
echo "\n* Finished :)\n" |
Thanks for the script. on my setup of linux I had to add -O SourceCodePro_FontsOnly-$version.zip to the wget command, otherwise I would get a querystring on the downloaded file and the unzip command would not find it.
https://gist.github.com/lucasdavila/3875946#file-install_source_code_pro-sh-L10 should be ~/.local/share/fonts
to match XDG specs. ~/.fonts
is depricated by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html.
@hhagblom also added the option you commented, thanks.
Hi @amavlyanov
I am not using Ubuntu anymore, but I changed the script as you commented.
thanks.
that's not a ubuntu-specific rule.
thanks!
btw, https://raw.github.com/gist/3875946/install_source_code_pro.sh gives 400 now. It might be removed.
400 here as well...
Same here, sh: 1: 400:: not found
Thanks!
Doesn't work for me
perfect!