sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

install-autodetect.sh (865B)


      1 #!/usr/bin/env bash
      2 
      3 #
      4 # What does this script ?
      5 #
      6 # Creates the files:
      7 #    ~/.fonts/icons-in-terminal.ttf
      8 #    ~/.config/fontconfig/conf.d/30-icons.conf
      9 #
     10 # Creates the directory:
     11 #    ~/.local/share/icons-in-terminal
     12 # or $XDG_DATA_HOME/icons-in-terminal (if $XDG_DATA_HOME is set)
     13 #
     14 # Copy the built files in the created directory
     15 #
     16 # Run the command:
     17 # fc-cache
     18 #
     19 
     20 set -xe
     21 
     22 DATA="${XDG_DATA_HOME:-${HOME}/.local/share}/icons-in-terminal/"
     23 
     24 mkdir -p ~/.fonts
     25 cp ./build/icons-in-terminal.ttf ~/.fonts/
     26 mkdir -p ~/.config/fontconfig/conf.d
     27 ./scripts/generate_fontconfig_autodetect.sh > ~/.config/fontconfig/conf.d/30-icons.conf
     28 fc-cache -fvr --really-force ~/.fonts
     29 
     30 mkdir -p "$DATA"
     31 cp ./build/* "$DATA"
     32 
     33 set +xe
     34 
     35 VERBOSE=1 ./scripts/generate_fontconfig_autodetect.sh
     36 
     37 echo -e "\nFont successfully installed. Now start a new terminal and run print_icons.sh :)"