home *** CD-ROM | disk | FTP | other *** search
- #
- # NAME:
- #
- # truetype_font_uninstall un-installs all the TrueType fonts
- #
- # SYNOPSIS:
- #
- # truetype_font_uninstall next_root_directory
- #
- #
- # DESCRIPTION:
- #
- # truetype_font_uninstall is a Bourne shell script used to
- # un-install all true type fonts found in the fonts directory.
- #
- # EXAMPLES:
- #
- # >truetype_font_uninstall $(NEXT_ROOT)
- #
- #
- case $# in
- 1 )
- ;;
- * )
- echo "truetype_font_uninstall : usage";
- echo " truetype_font_install root_directory";;
- esac
-
- if test ! -d $1
- then
- echo "truetype_font_uninstall : invalid directory" $1
- exit 1
- fi
-
- if test ! -d $1/NextLibrary/Fonts
- then
- echo "truetype_font_uninstall : no font directory" $1/NextLibrary/Fonts
- exit 1
- fi
-
- for file in $1/NextLibrary/Fonts/*.font
- do
- if grep -s "/FontType 42" $file/*
- then
- echo "truetype_font_uninstall :" $file
- rm -rf $file
- fi
- done
- rm -rf $1/NextLibrary/Fonts/.fontlist
- rm -rf $1/NextLibrary/Fonts/.fontdirectory
- exit 0
-