linkchecker/debian/linkchecker-ssl.postinst
2001-04-03 19:32:11 +00:00

31 lines
858 B
Bash

#!/bin/sh -e
#
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
# 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