1
0
Files
gcc-14/debian/libstdc++CXX.prerm
Konstantin Demin c2c1923c7b initial import from Debian
version: 14.3.0-5
commit: bee30ab0fff2fd6af94c62376c8aa4221bb831e0
2025-08-11 15:00:09 +03:00

14 lines
435 B
Bash

#! /bin/sh
set -e
case "$1" in
remove|upgrade)
files=$(dpkg -L libstdc++@CXX@@TARGET_QUAL@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}')
rm -f $files
dirs=$(dpkg -L libstdc++@CXX@@TARGET_QUAL@ | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {NF--; print}' | sort -u)
find $dirs -mindepth 1 -maxdepth 1 -name __pycache__ -type d -empty | xargs -r rmdir
esac
#DEBHELPER#