#!/bin/sh -e # # Written 1998 by Gregor Hoffleit . # used by Bastian Kleineidam for LinkChecker FILELIST= SITEPACKAGES="/usr/lib/python2.0/site-packages" DIRLIST="linkcheckssl" 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 python2 -O /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i python2 /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i done # use /bin/sh -c, otherwise I get a SyntaxError from Python for i in $FILELIST; do /bin/sh -c "python2 -O -c $COMMAND $SITEPACKAGES/$i" /bin/sh -c "python2 -c $COMMAND $SITEPACKAGES/$i" done ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0