Mercurial > mplayer.hg
annotate debian/mplayer.preinst @ 33179:218edd8fc782
Cosmetic: Format to MPlayer coding style.
Additionally: remove needless includes, group and sort includes, group
and sort variables, rename gtkAOFakeSurround declaration gtkAOSurround,
add #ifdefs to variable declarations, group statements by adding or
removing new lines to ease reading, move assignments outside conditions,
add parentheses, avoid mixing declaration and code, revise comments and
add new ones.
author | ib |
---|---|
date | Fri, 15 Apr 2011 14:30:58 +0000 |
parents | c9f9a077d760 |
children |
rev | line source |
---|---|
31833
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
1 #!/bin/sh |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
2 # preinst script |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
3 # |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
4 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
5 set -e |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
6 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
7 # summary of how this script can be called: |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
8 # * <new-preinst> `install' |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
9 # * <new-preinst> `install' <old-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
10 # * <new-preinst> `upgrade' <old-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
11 # * <old-preinst> `abort-upgrade' <new-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
12 # for details, see http://www.debian.org/doc/debian-policy/ or |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
13 # the debian-policy package |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
14 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
15 case "$1" in |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
16 install) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
17 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
18 upgrade) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
19 if dpkg --compare-versions "$2" le "1.0~rc3+svn20090405-1"; then |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
20 md5=`md5sum /etc/mplayer/mplayer.conf | cut -d' ' -f1` |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
21 case "$md5" in |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
22 9bdac8eb1184daa188d4829575ceafe8|\ |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
23 46f52a60c07ed788500056dd7ffd27b9) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
24 echo "removing obsolete /etc/mplayer/mplayer.conf" |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
25 rm -f /etc/mplayer/mplayer.conf |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
26 esac |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
27 fi |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
28 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
29 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
30 abort-upgrade) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
31 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
32 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
33 *) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
34 echo "preinst called with unknown argument \`$1'" >&2 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
35 exit 1 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
36 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
37 esac |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
38 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
39 # dh_installdeb will replace this with shell code automatically |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
40 # generated by other debhelper scripts. |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
41 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
42 #DEBHELPER# |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
43 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
44 exit 0 |