File: bitpim.postinst

package info (click to toggle)
bitpim 0.9.08.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 24,228 kB
  • ctags: 45,773
  • sloc: python: 191,894; cpp: 2,074; perl: 600; ansic: 343; sh: 185; makefile: 76; sed: 1
file content (27 lines) | stat: -rw-r--r-- 808 bytes parent folder | download
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
#!/bin/sh
set -e

#DEBHELPER#

# Also deploy our udev rules on upgrades from older versions.
if [ "$1" = configure ]  &&  [ -n "$2" ]  \
   &&  dpkg --compare-versions "$2" lt 0.9.07; then
	ln -s ../bitpim.rules /etc/udev/rules.d/z60_bitpim.rules
fi

# Standard tools just arrange to produce unoptimized .pyc files; ensure
# that we also have optimized .pyo files for better performance.
# Also, supply -Wignore to suppress spurious FutureWarnings.  (See #358023.)

if test -x /usr/bin/pyversions; then
    PYTHON=`pyversions -d`
else
    PYTHON=python2.3
fi

if which $PYTHON >/dev/null 2>&1 && [ -e /usr/lib/$PYTHON/compileall.py ]; then
    # $PYTHON -Wignore /usr/lib/$PYTHON/compileall.py -q /usr/share/bitpim
    $PYTHON -OO -Wignore /usr/lib/$PYTHON/compileall.py -q /usr/share/bitpim/code
fi

exit 0