blob: 9063c537922060b6b6e5f491fc134359b5bf9c81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# arg 1: the new package version
pre_install() {
/bin/true
}
# arg 1: the new package version
post_install() {
echo -n "updating font cache... "
cd /usr/share/fonts/3270
/usr/bin/fc-cache -f > /dev/null
/usr/bin/mkfontdir
/usr/bin/mkfontscale
xset fp+ /usr/share/fonts/3270/
xset fp rehash
echo -e "\n--> You can put the hosts you want to connect to"
echo "--> in /etc/x3270/ibm_hosts"
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
/bin/true
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}
# arg 1: the old package version
pre_remove() {
[ -d /usr/share/fonts/3270 ] || return
rm -rf /usr/share/fonts/3270
}
# arg 1: the old package version
post_remove() {
echo -n "rebuilding font cache"
fc-cache -f > /dev/null
xset fp- /usr/share/fonts/3270/
xset fp rehash
}
op=$1
shift
$op $*
|