mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-23 01:10:27 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@214 e7d03fd6-7b0d-0410-9947-9c21f3af8025
31 lines
876 B
Bash
Executable file
31 lines
876 B
Bash
Executable file
#!/bin/sh -e
|
|
#
|
|
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
|
|
# used by Bastian Kleineidam for LinkChecker
|
|
|
|
DIRLIST="/usr/lib/python1.5/site-packages/linkcheck"
|
|
FILELIST="LinkCheckerConf.py"
|
|
SITEPACKAGES="/usr/lib/python1.5/site-packages"
|
|
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/python1.5/compileall.py -q $i
|
|
python /usr/lib/python1.5/compileall.py -q $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
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|