Bochs/bochs/install-x11-fonts
Bryce Denney d282407d8c - I made some changes that improve the "make rpm" and install process
- start using autoconf/configure's standard of prefix, exec_prefix, bindir,
  mandir to control where make install puts things
- added script install-x11-fonts
- make install no longer tries to install DLXlinux (since not everyone will
  want it).  Now you must do make install_dlx if you want it.
- renamed erase_install to uninstall
- in RPM spec file:
  - run .conf.linux instead of .conf.linux-x86.  This is just a name change.
  - build directory hierarchy in the buildroot
  - patch up broken symbolic links in buildroot (ugly)
  - run font install script in  %post
  - clean up dlxlinux directory in %preun to avoid warning about not
    removing /usr/local/bochs/dlxlinux/bochsout.txt
  - remove /usr/local/bochs if nothing left in it
2001-06-06 13:57:24 +00:00

101 lines
2.1 KiB
Bash
Executable File

#!/bin/sh
#
# install-x11-fonts
# $Id: install-x11-fonts,v 1.1 2001-06-06 13:57:24 bdenney Exp $
#
# This is designed help people to get the Bochs fonts installed on their
# system.
#
X11_FONT_PATH_CHOICES="/usr/lib/X11/fonts /usr/openwin/lib/X11/fonts"
FONTS=vga.pcf
FONT_SOURCE_PATH_CHOICES="font /usr/local/bochs/latest"
die () {
cat <<EOF
install-x11-fonts failed.
To try it again, su root and run $0.
EOF
exit 1
}
echo -n "Looking for fonts to install... "
found=0
for sourcepath in $FONT_SOURCE_PATH_CHOICES; do
#echo -n " $sourcepath/ ... "
if test -f $sourcepath/vga.pcf; then
echo $sourcepath/
found=1
break
fi
done
if test ! $found = 1; then
echo FAILE
echo "ERROR: I could not find the Bochs fonts to install. I looked in:"
echo " $FONT_SOURCE_PATH_CHOICES"
die
fi
FONT_SOURCE_PATH=$sourcepath
echo -n "Looking for X11 Font Path... "
found=0
for fontpath in $X11_FONT_PATH_CHOICES; do
if test -d $fontpath -a -d $fontpath/misc; then
echo $fontpath
found=1
break
fi
done
if test ! $found = 1; then
echo FAILED
cat <<EOF
ERROR: I could not find your X11 Font Path, so I can't guarantee that the
Bochs VGA Font is installed correctly. Please figure out where the X11 fonts
are found on your system and post a bug report about the RPM Post-Install
Script. I already looked in:
$X11_FONT_PATH_CHOICES
EOF
die
fi
added_font=0
for f in $FONTS; do
echo -n "Installing $f... "
if test ! -f $FONT_SOURCE_PATH/$f; then
echo FAILED
echo "ERROR: $f is on the list of fonts to install, and it wasn't found "
echo " in $FONT_SOURCE_PATH"
die
elif test ! -f $fontpath/misc/$f; then
echo ok
added_font=1
cp $FONT_SOURCE_PATH/$f $fontpath/misc
if test ! $? = 0; then
echo ERROR: Copy failed; die
fi
else
echo "ok (it was already there)"
fi
done
echo Running mkfontdir...
mkfontdir $fontpath
ret=$?
if test $ret != 0; then
echo ERROR: mkfontdir returned $ret
die
fi
if test $added_font = 1; then
cat <<EOF
NOTE: If you have trouble loading X fonts in this session, you might need
to type "xset fp rehash."
EOF
fi
echo Done installing Bochs fonts for X11.