metalx1000

Get and Install 1001 Free Fonts on Linux

Oct 9th, 2018
968
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.34 KB | None | 0 0
  1. #!/bin/bash
  2. ######################################################################
  3. #Copyright (C) 2018  Kris Occhipinti
  4. #https://filmsbykris.com
  5.  
  6. #This program is free software: you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation, either version 3 of the License, or
  9. #(at your option) any later version.
  10.  
  11. #This program is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18. ######################################################################
  19.  
  20. domain="https://www.1001freefonts.com"
  21. pagenum="100"
  22.  
  23. for i in `seq 1 $pagenum`;
  24. do
  25.   wget -q "$domain/new-fonts-$i.php" -O-|\
  26.   grep DOWNLOAD|\
  27.   cut -d\' -f2|\
  28.   sort -u|while read u;
  29.   do
  30.     wget -c "$domain$u"
  31.   done
  32. done
  33.  
  34. #unzip files
  35. for z in *.zip;
  36. do
  37.   unzip -o "$z";
  38. done
  39.  
  40. #move fonts to fonts folder
  41. mkdir -p $HOME/.local/share/fonts
  42. find -iname "*.ttf" -o -iname "*.otf"|while read f
  43. do
  44.   mv "$f" $HOME/.local/share/fonts
  45. done
  46.  
  47. #update fonts to system
  48. fc-cache -f -v
Add Comment
Please, Sign In to add comment