home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEPLOY / RUNTIME.Z / ttuninst.sh < prev    next >
Text File  |  1996-09-08  |  972b  |  52 lines

  1. #
  2. # NAME:
  3. #
  4. #       truetype_font_uninstall un-installs all the TrueType fonts
  5. #
  6. # SYNOPSIS:    
  7. #
  8. #    truetype_font_uninstall next_root_directory
  9. #
  10. #
  11. # DESCRIPTION:
  12. #
  13. #    truetype_font_uninstall is a Bourne shell script used to 
  14. #    un-install all true type fonts found in the fonts directory.
  15. #
  16. #  EXAMPLES:
  17. #
  18. #    >truetype_font_uninstall $(NEXT_ROOT)
  19. #
  20. #
  21. case $# in
  22.     1 )
  23.         ;;
  24.     * )
  25.         echo "truetype_font_uninstall : usage";
  26.         echo "      truetype_font_install root_directory";;
  27. esac
  28.  
  29. if test ! -d $1
  30. then
  31.     echo "truetype_font_uninstall : invalid directory" $1
  32.     exit 1
  33. fi
  34.  
  35. if test ! -d $1/NextLibrary/Fonts
  36. then
  37.     echo "truetype_font_uninstall : no font directory" $1/NextLibrary/Fonts
  38.     exit 1
  39. fi
  40.  
  41. for file in $1/NextLibrary/Fonts/*.font
  42. do
  43.     if grep -s "/FontType 42" $file/*
  44.     then
  45.         echo "truetype_font_uninstall :" $file
  46.         rm -rf $file
  47.     fi
  48. done
  49. rm -rf $1/NextLibrary/Fonts/.fontlist
  50. rm -rf $1/NextLibrary/Fonts/.fontdirectory
  51. exit 0
  52.