1 | #!/bin/bash
|
2 |
|
3 | _dir="$( cd "$( dirname "$0" )" && pwd )"
|
4 |
|
5 | if [ -f "$HOME/.has_bash_fonts_installed" ]; then :
|
6 | else
|
7 | if test "$(uname)" = "Darwin" ; then
|
8 | # MacOS
|
9 | font_dir="$HOME/Library/Fonts"
|
10 | else
|
11 | # Linux
|
12 | font_dir="$HOME/.local/share/fonts"
|
13 | mkdir -p $font_dir
|
14 | fi
|
15 |
|
16 | nasc-termtools copy-fonts "$font_dir"
|
17 |
|
18 | # Reset font cache on Linux
|
19 | if which fc-cache >/dev/null 2>&1 ; then
|
20 | echo "Resetting font cache, this may take a moment..."
|
21 | fc-cache -f "$font_dir"
|
22 | fi
|
23 |
|
24 | echo "Installed fonts for terminal"
|
25 | nasc-termtools check
|
26 |
|
27 | echo "Type \"termtools help\" for more information."
|
28 | echo "For any question, bug report or suggestion, check our repository and leave an issue or comment."
|
29 | echo ""
|
30 |
|
31 | echo 1 > "$HOME/.has_bash_fonts_installed"
|
32 | fi
|