blob: 0524f862f340c0ede2c5bd56b340a07c2a4b4e34 (
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
post_install() {
if [ ! -d /var/log/mythtv ]
then
mkdir -p /var/log/mythv
chown -R mythtv /var/log/mythtv
echo "---" > /var/log/mythtv/mythbackend.log
chown mythtv /var/log/mythtv/mythbackend.log
fi
ln -s /usr/share/mythtv/themes/defaultmenu/is.xml /usr/share/mythtv/is.xml
}
pre_upgrade() {
if [ ! -L /usr/share/mythtv/is.xml ]
then
mv /usr/share/mythtv/is.xml /usr/share/mythtv/is.xml.pre
else
mv /usr/share/mythtv/themes/defaultmenu/is.xml /usr/share/mythtv/themes/defaultmenu/is.xml.pre
fi
}
post_upgrade() {
if [ ! -d /var/log/mythtv ]
then
mkdir -p /var/log/mythv
chown -R mythtv /var/log/mythtv
fi
if [ -e /usr/share/mythtv/is.xml.pre ]
then
rm -fr /usr/share/mythtv/themes/defaultmenu/is.xml
mv /usr/share/mythtv/is.xml.pre /usr/share/mythtv/themes/defaultmenu/is.xml
ln -s /usr/share/mythtv/themes/defaultmenu/is.xml /usr/share/mythtv/is.xml
else
mv /usr/share/mythtv/themes/defaultmenu/is.xml.pre /usr/share/mythtv/themes/defaultmenu/is.xml
fi
}
# arg 1: the old package version
post_remove() {
/bin/true
}
op=$1
shift
$op $*
|