1#!/bin/sh 2 3NDIR=$HOME/.netscape 4PFILE=$NDIR/preferences.js 5CFFILE=$NDIR/fontsz.cf 6TMPFILE=$NDIR/fontsz.sed 7 8die() { 9 echo "notscape: can't $*" >&2 10 exit 1 11} 12 13[ -r $CFFILE ] && { 14awk '{ printf("/intl.font_spec_list/s/-[^-]*-\\([^-]*\\)-%s,/-%s-\\1-%s,/\n", \ 15 $1, $2, $1); }' <$CFFILE >$TMPFILE 16 17cp $PFILE $PFILE.old || die "save old pref file" 18sed -f $TMPFILE <$PFILE.old >$PFILE.new || die "create new pref file" 19[ -s $PFILE.new ] || die "create new pref file" 20 21mv $PFILE.new $PFILE || die "install new pref file" 22 23} 24 25exec netscape -no-about-splash "$@" 26