diff options
author | Achil | 2022-09-06 18:56:51 +0200 |
---|---|---|
committer | Achil | 2022-09-06 18:56:51 +0200 |
commit | 5bce61c04e589e368d534c4797711ac73c1e1f23 (patch) | |
tree | 299f2b64723a5c9697937f651cecf1416604baad /debian/zinc-python/DEBIAN/postinst | |
parent | b60b3de318b4e621518681cc2824b4d9c605ae9e (diff) | |
download | tkzinc-5bce61c04e589e368d534c4797711ac73c1e1f23.zip tkzinc-5bce61c04e589e368d534c4797711ac73c1e1f23.tar.gz tkzinc-5bce61c04e589e368d534c4797711ac73c1e1f23.tar.bz2 tkzinc-5bce61c04e589e368d534c4797711ac73c1e1f23.tar.xz |
Daniel Etienne pre release for Bullseye
Diffstat (limited to 'debian/zinc-python/DEBIAN/postinst')
-rwxr-xr-x | debian/zinc-python/DEBIAN/postinst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/zinc-python/DEBIAN/postinst b/debian/zinc-python/DEBIAN/postinst new file mode 100755 index 0000000..0f85b0a --- /dev/null +++ b/debian/zinc-python/DEBIAN/postinst @@ -0,0 +1,23 @@ +#! /bin/bash -e +# +# Debian postinst script for Python hierarchical modules +# Written by Gregor Hoffleit <flight@debian.org> +# + +NAME=zinc-python +DEFAULT_VERSION_PYTHON=`dpkg -p python| grep -e "^Version:" |cut -d" " -f2|cut -d"." -f1-2` +DIRLIST="/usr/lib/python${DEFAULT_VERSION_PYTHON}/site-packages" + +case "$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + for i in $DIRLIST ; do + python -O /usr/lib/python${DEFAULT_VERSION_PYTHON}/compileall.py -q $i + python /usr/lib/python${DEFAULT_VERSION_PYTHON}/compileall.py -q $i + done + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac |