2024-10-23 12:12:30 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
old_version_suffix=$(printf '%s' "$2" | sed -En 's/^([0-9]+\.[0-9]+).*/\1/p')
|
|
|
|
if [ -n "${old_version_suffix}" ] ; then
|
2024-10-23 12:12:30 +03:00
|
|
|
dpkg-maintscript-helper symlink_to_dir \
|
2024-10-29 05:12:06 +03:00
|
|
|
/usr/share/doc/linux-perf "linux-perf-${old_version_suffix}" '5.16~rc8-1~exp1' linux-perf -- "$@"
|
2024-10-23 12:12:30 +03:00
|
|
|
fi
|
2024-10-29 05:12:06 +03:00
|
|
|
unset old_version_suffix
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
case "$1" in
|
|
|
|
remove )
|
|
|
|
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 ; unset wrapper diversion
|
|
|
|
;;
|
|
|
|
esac
|
2024-10-23 12:12:30 +03:00
|
|
|
|
|
|
|
#DEBHELPER#
|