File: fontlink

package info (click to toggle)
dvi2ps 3.2j-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,344 kB
  • ctags: 1,896
  • sloc: ansic: 12,767; sh: 938; makefile: 269
file content (31 lines) | stat: -rwxr-xr-x 451 bytes parent folder | download | duplicates (13)
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
#!/bin/sh
# fontlink mode
#   link from $l (flat) to $s (hier)
mode=$1
l=/usr/local/lib/tex/fonts/pk$mode
s=/usr/local/share/texmf/fonts/pk/$mode
tmp=/tmp/FL.$$

if test ! -d $l
then
	echo make directory $l
	mkdirhier $l
fi
cat <<'EOF' > $tmp
#!/bin/sh
link() {
	if test -f $2
	then
		echo $2 exists
	else
		ln -s $1 $2
	fi
}
EOF
echo 'l='$l >> $tmp

find $s -type f -a -exec echo {} \; |\
sed -e 's+.*/\(.*\)$+link & $l/\1+' >> $tmp

sh $tmp
rm $tmp