Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
# Trivial script for checking and setting the default PostScript font
3
# encoding. Changing the default assumes you can write in $POSTLIB.
4
# Available font encodings are files in $POSTLIB that end in .enc.
5
# The default is $POSTLIB/Default.enc.
6
#
7
 
8
POSTLIB=/sys/lib/postscript/prologues
9
DEFAULT=Default.enc
10
CURRENTDEFAULT=Standard
11
 
12
if (~ $#* 0) {
13
	cd $POSTLIB
14
	for (i in *.enc) {
15
		if (test -f $i -a $i '!=' $DEFAULT) {
16
			NAME=`{echo $i | sed s/\\.enc//}
17
			if (cmp $i $DEFAULT >/dev/null >[2]/dev/null) {
18
				CURRENTDEFAULT=$NAME
19
			}
20
			echo $NAME
21
		}
22
	}
23
	echo Standard
24
	echo Default'='$CURRENTDEFAULT
25
}
26
if not {
27
	switch ($1) {
28
	case Default
29
		;
30
	case Standard
31
		rm -f $POSTLIB/$DEFAULT
32
	case *
33
		if (test -f $POSTLIB/$1.enc) {
34
			rm -f $POSTLIB/$DEFAULT
35
			cp $POSTLIB/$1.enc $POSTLIB/$DEFAULT
36
		}
37
		if not echo unrecognized encoding name $1 >[1=2]
38
	}
39
}