1
1
mirror of https://github.com/tonsky/FiraCode.git synced 2024-07-04 16:06:26 +03:00

Put steps into an install script.

Craig Moore 2018-05-29 23:42:45 -04:00
parent 65147c7937
commit f5a2e7c4fe

@ -17,19 +17,33 @@ emerge -av media-fonts/fira-code
## Manual Installation
With most desktop-oriented distributions, double-clicking each font file in the ttf folder and selecting “Install font” should be enough. If it isnt, try this:
With most desktop-oriented distributions, double-clicking each font file in the ttf folder and selecting “Install font” should be enough. If it isnt, create and run download_and_install.sh script:
```bash
#!/bin/bash
fonts_dir="~/.local/share/fonts"
if [ ! -d ${fonts_dir} ]; then
echo "mkdir -p $fonts_dir"
mkdir -p ${fonts_dir}
else
echo "Found fonts dir $fonts_dir"
fi
for type in Bold Light Medium Regular Retina; do
file_path="~/.local/share/fonts/FiraCode-${type}.ttf"
file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true"
if [ ! -e ${file_path} ]; then
echo "wget -O $file_path $file_url"
wget -O ${file_path} ${file_url}
else
echo "Found existing file $file_path"
fi;
done
echo "fc-cache -f"
fc-cache -f
```
1. `mkdir -p ~/.local/share/fonts`
2. `touch download.sh`
3. ```shell
# In download.sh
for type in Bold Light Medium Regular Retina; do
wget -O ~/.local/share/fonts/FiraCode-${type}.ttf \
"https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true";
done
```
4. `bash download.sh`
5. `fc-cache -f`
[More details](https://github.com/tonsky/FiraCode/issues/4)