File: bitpim-lib.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 (24 lines) | stat: -rw-r--r-- 693 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

#DEBHELPER#

# Standard tools just arrange to produce unoptimized .pyc files; ensure
# that we also have optimized .pyo files for better performance.
# (Compile with -Wignore per #358023, and cover /usr/share/bitpim/code
# in addition to /usr/lib/bitpim to ensure that bitpim's .pyo files
# will remain valid when the default Python version changes.)

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
    for d in /usr/lib/bitpim /usr/share/bitpim/code; do
	test -d $d && $PYTHON -OO -Wignore /usr/lib/$PYTHON/compileall.py -q $d
    done
fi

exit 0