This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

ttf-win7-fonts-fix.sh

By: ngpbento on Jan 29th, 2012  |  syntax: Bash  |  size: 0.99 KB  |  views: 972  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /bin/sh
  2.  
  3. # replace these 2 variables with the appropriate values
  4. packageManager=packer
  5. fontLocation=~/AUR/fonts
  6.  
  7. # download PKGBUILD
  8. $packageManager -G ttf-win7-fonts
  9. cd ttf-win7-fonts
  10.  
  11. # fix PKGBUILD
  12. sed -r -i "s,=\('ttf-vista-fonts' 'ttf-ms-fonts'\),=\('ttf-vista-fonts' 'ttf-ms-fonts' 'ttf-tahoma'\),g" PKGBUILD
  13. sed -r -i "s,644 \*.ttf \",644 \*.ttf \*.TTF \",g" PKGBUILD
  14. sed -r -i "s,'license.rtf','license.rtf' 'lucon.ttf' 'ariblk.ttf' 'l_10646.ttf' 'micross.ttf' 'palabi.ttf' 'palab.ttf' 'palai.ttf' 'pala.ttf' 'symbol.ttf' 'tahomabd.ttf' 'tahoma.ttf' 'ARIALNBI.TTF' 'ARIALNB.TTF' 'ARIALNI.TTF' 'ARIALN.TTF',g" PKGBUILD
  15.  
  16. # copy fonts to current directory
  17. cp $fontLocation/* .
  18. mv Gabriola.ttf gabriola.ttf
  19. chmod 644 *.ttf *.ttc
  20.  
  21. # fix checksums in PKGBUILD
  22. sed -i '/^sha256sums/,/^$/d' PKGBUILD
  23. makepkg -g > xyzzy
  24. cat xyzzy >> PKGBUILD
  25. rm xyzzy
  26.  
  27. # makepkg and install
  28. makepkg -s
  29. sudo pacman -U ttf-win7-fonts-*.xz
  30.  
  31. # cleanup
  32. cd ..
  33. rm -rf ttf-win7-fonts
  34. rm ttf-win7-fonts.tar.gz
clone this paste RAW Paste Data