summaryrefslogtreecommitdiff
path: root/debian/idle-PVER.postinst.in
diff options
context:
space:
mode:
Diffstat (limited to 'debian/idle-PVER.postinst.in')
-rw-r--r--debian/idle-PVER.postinst.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/idle-PVER.postinst.in b/debian/idle-PVER.postinst.in
new file mode 100644
index 0000000..91b1902
--- /dev/null
+++ b/debian/idle-PVER.postinst.in
@@ -0,0 +1,32 @@
+#! /bin/sh
+#
+# postinst script for the Debian idle-@PVER@ package.
+# Written 1998 by Gregor Hoffleit <flight@debian.org>.
+#
+
+set -e
+
+DIRLIST="/usr/lib/python@VER@/idlelib"
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+
+ for i in $DIRLIST ; do
+ /usr/bin/@PVER@ /usr/lib/@PVER@/compileall.py -q $i
+ if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config
+ then
+ /usr/bin/@PVER@ -O /usr/lib/@PVER@/compileall.py -q $i
+ fi
+ done
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+
+esac
+
+#DEBHELPER#
+
+exit 0