File: postinst

package info (click to toggle)
sharefont 0.10-7
  • links: PTS
  • area: non-free
  • in suites: hamm, potato, slink
  • size: 956 kB
  • ctags: 3
  • sloc: makefile: 37; sh: 23
file content (19 lines) | stat: -rw-r--r-- 542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh

set -e

TEMP=`tempfile`
if [ -f /etc/X11/XF86Config ]; then
# add an entry to /etc/X11/XF86Config to enable the fonts on X11 startup
	if ! grep -q '^    FontPath.*sharefont/' /etc/X11/XF86Config; then
		sed </etc/X11/XF86Config >$TEMP \
			-e '/Section "Files"/,/EndSection/{' \
			-e '/EndSection/i\' \
			-e '    FontPath "/usr/X11R6/lib/X11/fonts/sharefont/"' \
			-e '}'
		cp $TEMP /etc/X11/XF86Config
		rm $TEMP
	fi
else
	echo "No XF86Config! You need to add the fontpath to /usr/X11R6/lib/X11/fonts/sharefont/ yourself."
fi