#!/bin/sh
set -e

# The postinst compiles bytecode next to every module, into __pycache__
# directories the package does not own. Left in place, they keep dpkg from
# removing a directory the new version no longer ships, and it warns.
case "$1" in
    upgrade)
        find /opt/meshbay-common/venv -depth -type d -name __pycache__ \
            -exec rm -rf {} + 2>/dev/null || true
        ;;
esac

#DEBHELPER#
