2000-12-22 16:25:32 +00:00
|
|
|
#!/bin/sh -e
|
2000-11-09 12:05:12 +00:00
|
|
|
#
|
|
|
|
|
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
|
|
|
|
|
# used by Bastian Kleineidam for LinkChecker
|
|
|
|
|
|
2001-04-03 19:32:11 +00:00
|
|
|
FILELIST=
|
|
|
|
|
SITEPACKAGES="/usr/lib/python2.0/site-packages"
|
|
|
|
|
DIRLIST="linkcheckssl"
|
2000-11-09 12:05:12 +00:00
|
|
|
COMMAND="'import sys,py_compile;py_compile.compile(sys.argv[1])'"
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
|
configure|abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
|
for i in $DIRLIST; do
|
2001-04-03 19:32:11 +00:00
|
|
|
python2 -O /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i
|
|
|
|
|
python2 /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i
|
2000-11-09 12:05:12 +00:00
|
|
|
done
|
|
|
|
|
# use /bin/sh -c, otherwise I get a SyntaxError from Python
|
|
|
|
|
for i in $FILELIST; do
|
2001-04-03 19:32:11 +00:00
|
|
|
/bin/sh -c "python2 -O -c $COMMAND $SITEPACKAGES/$i"
|
|
|
|
|
/bin/sh -c "python2 -c $COMMAND $SITEPACKAGES/$i"
|
2000-11-09 12:05:12 +00:00
|
|
|
done
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
|
|
exit 0
|