diff options
Diffstat (limited to 'debian/fuse-python.postinst')
-rw-r--r-- | debian/fuse-python.postinst | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/fuse-python.postinst b/debian/fuse-python.postinst new file mode 100644 index 0000000..8afbe69 --- /dev/null +++ b/debian/fuse-python.postinst @@ -0,0 +1,31 @@ +#! /bin/sh -e +# +# postinst script for Debian python packages. +# Written 1998 by Gregor Hoffleit <flight@debian.org>. +# Modified 2001 by Matthias Klose <doko@debian.org> + +PACKAGE=`basename $0 .postinst` +PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{ + s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p + q +}'` +PYTHON=python$PV +DIRLIST="/usr/lib/python$PV/site-packages/extension" + +case "$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + for i in $DIRLIST ; do + /usr/bin/$PYTHON -O /usr/lib/python$PV/compileall.py -q $i + /usr/bin/$PYTHON /usr/lib/python$PV/compileall.py -q $i + done + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 |