archey4/packaging/before_remove
Samuel FORESTIER c7feeb6921 [PACKAGING] Deletes untracked byte-code files on package removal
... and documents the reason why we are not shipping them in the first place.
2020-05-24 10:01:19 +02:00

19 lines
370 B
Bash

#!/bin/sh
set -e
# Removes symbolic link created by `after_install`.
if [ -L /usr/bin/archey4 ]; then
rm /usr/bin/archey4
fi
# Removes any byte-code file that may have been generated by Archey.
# Wild-cards are being used to match all supported distribution layouts.
find /usr/lib/python3*/*-packages/archey \
-type d \
-name __pycache__ \
-exec \
rm -r {} +