summaryrefslogtreecommitdiffstats
path: root/russian/koi8r-ps/pkg-deinstall
blob: 4b9a4235c8bbd3a4037b98ecfc092ac89f3b8feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
if [ "$2" = "POST-DEINSTALL" ] ; then exit ; fi
if ! [ -e "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path ] ; then
	cat << END_WARNING
	The file "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path does not exist.
	Unable to patch the GhostScript's Fontmap to stop using the
	Cyrillic fonts, which you are removing, yb default.
END_WARNING
	exit
fi


FONTMAP=`cat "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path`
if [ -e "$FONTMAP" ] ; then
	cat << EXPLANATION
	Patching the file
		$FONTMAP
	to tell GhostScript to stop looking for the fonts in this package.
EXPLANATION
	env SIMPLE_BACKUP_SUFFIX=.CyrPS VERSION_CONTROL= \
		patch -l -N -R "$FONTMAP" "${PKG_PREFIX}/share/koi8r-ps/Fontmap.diff" \
			&& rm -f "$FONTMAP".CyrPS
else
	if [ "$FONTMAP" != "/nicht/" ] ; then
		cat << END_WARNING

	The file
		$FONTMAP
	is recorded as  the one patched during the  isntallation of this
	package. However,  the file does  not exist  now, so we  can not
	reverse the patch. You _may_ have problem using GhostScript now.

END_WARNING
	fi
fi
OpenPOWER on IntegriCloud