mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
47 lines
845 B
Text
47 lines
845 B
Text
|
configs=('61-culmus.conf')
|
||
|
|
||
|
update_fontcache() {
|
||
|
fc-cache -fs
|
||
|
mkfontscale /usr/share/fonts/Type1
|
||
|
mkfontdir /usr/share/fonts/Type1
|
||
|
mkfontscale /usr/share/fonts/TTF
|
||
|
mkfontdir /usr/share/fonts/TTF
|
||
|
}
|
||
|
|
||
|
post_install() {
|
||
|
pushd /etc/fonts/conf.d > /dev/null
|
||
|
for config in "${configs[@]}"; do
|
||
|
ln -sf ../conf.avail/${config} .
|
||
|
done
|
||
|
popd > /dev/null
|
||
|
|
||
|
update_fontcache
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
if [ "`vercmp 0.102-1 $2`" != "-1" ] || [ ! -L /etc/fonts/conf.d/61-culmus.conf ]; then
|
||
|
pushd /etc/fonts/conf.d > /dev/null
|
||
|
for config in "${configs[@]}"; do
|
||
|
ln -sf ../conf.avail/${config} .
|
||
|
done
|
||
|
popd > /dev/null
|
||
|
fi
|
||
|
|
||
|
update_fontcache
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
pushd /etc/fonts/conf.d > /dev/null
|
||
|
for config in "${configs[@]}"; do
|
||
|
rm -f ${config}
|
||
|
done
|
||
|
popd > /dev/null
|
||
|
|
||
|
update_fontcache
|
||
|
}
|
||
|
|
||
|
op=$1
|
||
|
shift
|
||
|
|
||
|
$op $*
|