
ttf-win7-fonts-fix.sh
By:
ngpbento on
Jan 29th, 2012 | syntax:
Bash | size: 0.99 KB | hits: 909 | expires: Never
#! /bin/sh
# replace these 2 variables with the appropriate values
packageManager=packer
fontLocation=~/AUR/fonts
# download PKGBUILD
$packageManager -G ttf-win7-fonts
cd ttf-win7-fonts
# fix PKGBUILD
sed -r -i "s,=\('ttf-vista-fonts' 'ttf-ms-fonts'\),=\('ttf-vista-fonts' 'ttf-ms-fonts' 'ttf-tahoma'\),g" PKGBUILD
sed -r -i "s,644 \*.ttf \",644 \*.ttf \*.TTF \",g" PKGBUILD
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
# copy fonts to current directory
cp $fontLocation/* .
mv Gabriola.ttf gabriola.ttf
chmod 644 *.ttf *.ttc
# fix checksums in PKGBUILD
sed -i '/^sha256sums/,/^$/d' PKGBUILD
makepkg -g > xyzzy
cat xyzzy >> PKGBUILD
rm xyzzy
# makepkg and install
makepkg -s
sudo pacman -U ttf-win7-fonts-*.xz
# cleanup
cd ..
rm -rf ttf-win7-fonts
rm ttf-win7-fonts.tar.gz