File: preinst

package info (click to toggle)
cltl 1.1.0
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 148 kB
  • sloc: sh: 147; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -e

# work around "#700670 - 'old-postrm upgrade' removes /usr/share/doc/cltl/*
#   after the new package was unpacked"
# by disabling the offending line
if dpkg --compare-versions "$2" lt-nl "1.0.27" ; then
	if [ -f /var/lib/dpkg/info/cltl.postrm ]; then
		echo "Disabling buggy code in old postrm script..."
		sed -ir '8{\%^rm -rf /usr/share/doc/cltl/\*\s*$%{s/^/#/}}' /var/lib/dpkg/info/cltl.postrm
	fi
fi

#DEBHELPER#