mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-22 17:00:25 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@374 e7d03fd6-7b0d-0410-9947-9c21f3af8025
34 lines
1,010 B
Bash
Executable file
34 lines
1,010 B
Bash
Executable file
#!/bin/sh -e
|
|
#
|
|
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
|
|
# used by Bastian Kleineidam for LinkChecker
|
|
|
|
PYTHON=python2.1
|
|
SITEPACKAGES=/usr/lib/$PYTHON/site-packages
|
|
DIRLIST=linkcheck
|
|
FILELIST=_linkchecker_configdata.py
|
|
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
|
|
$PYTHON -O /usr/lib/$PYTHON/compileall.py -q $SITEPACKAGES/$i
|
|
$PYTHON /usr/lib/$PYTHON/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 "$PYTHON -O -c $COMMAND $SITEPACKAGES/$i"
|
|
/bin/sh -c "$PYTHON -c $COMMAND $SITEPACKAGES/$i"
|
|
done
|
|
# for later use of python-central
|
|
#/usr/sbin/register-python-package module configure linkchecker ">=2.0"
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|