#!/bin/sh
#
# This postrm script cleans up all the cached compiled .pyc files and/or
# __pycache__ dirs within the installed tklbam file tree. This avoids the
# apt warning about non-empty directories not being removed.
#
# Note that it will clean all .pyc files / __pycache__ dirs from all
# /usr/lib/tklbam subdirectories - including ones within the 'tklbam-squd'
# directories which are not part of the tklbam package (although are a
# dependency). While this is not ideal, it is not really destructive.

set -e

find /usr/lib/tklbam -type f -name "*.pyc" -delete
# '-delete' can't be used for dirs that may include files, so use 'exec rm'
# instead
find /usr/lib/tklbam -type d -name "__pycache__" -exec rm -rf {} +

# dh_installdeb will replace this comment with shell code automatically
# generated by other debhelper scripts.



exit 0
