Advertisement
ngpbento

ttf-win7-fonts-fix.sh

Jan 29th, 2012
1,073
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.99 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement