1
0
linux/debian/linux-perf.postrm
Konstantin Demin c3d09a3e94 initial commit
imported from https://salsa.debian.org/kernel-team/linux.git
commit 9d5cc9d9d6501d7f1dd7e194d4b245bd0b6c6a22
version 6.11.4-1
2024-10-23 12:12:30 +03:00

23 lines
611 B
Bash

#!/bin/sh
set -e
old_version_suffix="$(echo "$2" | sed -rn 's/^([0-9]+\.[0-9]+).*/\1/p')"
if [ "$old_version_suffix" ]; then
dpkg-maintscript-helper symlink_to_dir \
/usr/share/doc/linux-perf "linux-perf-${old_version_suffix}" 5.16\~rc8-1\~exp1 linux-perf -- "$@"
fi
if [ "$1" = remove ]
then
for wrapper in /usr/bin/perf \
/usr/share/bash-completion/completions/perf \
/usr/share/man/man1/perf.1.gz; do
diversion="${wrapper%/perf*}/perf.wrapper${wrapper#*/perf}"
dpkg-divert --package linux-perf --divert "$diversion" --rename \
--remove "$wrapper"
done
fi
#DEBHELPER#