sistema_progs

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

install.sh (1044B)


      1 #!/usr/bin/env bash
      2 
      3 #
      4 # What does this script ?
      5 #
      6 # Create the files:
      7 #    ~/.fonts/icons-in-terminal.ttf
      8 #    ~/.config/fontconfig/conf.d/30-icons.conf
      9 #
     10 # Create 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 source ./scripts/colors.sh
     21 
     22 set -xe
     23 
     24 DATA="${XDG_DATA_HOME:-${HOME}/.local/share}/icons-in-terminal/"
     25 
     26 mkdir -p ~/.fonts
     27 cp ./build/icons-in-terminal.ttf ~/.fonts/
     28 mkdir -p ~/.config/fontconfig/conf.d
     29 ./scripts/generate_fontconfig.sh > ~/.config/fontconfig/conf.d/30-icons.conf
     30 fc-cache -fvr --really-force ~/.fonts
     31 
     32 mkdir -p "$DATA"
     33 cp ./build/* "$DATA"
     34 
     35 set +xe
     36 
     37 echo -e "\n${YELLOW}Recommended additional step:"
     38 echo "Edit ~/.config/fontconfig/conf.d/30-icons.conf"
     39 echo "Check that the font(s) you are using in your terminal(s) is listed and remove all the others lines"
     40 echo -e "\n${NORMAL}Font successfully installed. Now start a new terminal and run print_icons.sh :)"