configFonts.src 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-FONTS
  5. XCOMM customize
  6. XCOMM @(#) $XConsortium: configFonts.src /main/4 1996/04/23 19:32:48 drk $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. #define STAR *
  13. XCOMM ############################################
  14. RemoveFontFiles()
  15. {
  16. while read -r SRC
  17. do
  18. if [ "$SRC" != "" ]
  19. then
  20. rm -f "$SRC"
  21. dirname=${SRC%/STAR}
  22. if [ -d "$dirname" ]
  23. then
  24. cd "$dirname" || exit
  25. while [ "$dirname" != "$CDE_TOP" ]
  26. do
  27. cd ..
  28. rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
  29. dirname=${dirname%/STAR}
  30. done
  31. fi
  32. fi
  33. done <<-EOF
  34. #include "CDE-FONTS.list"
  35. EOF
  36. }
  37. VerifyInstalledFiles()
  38. {
  39. echo "Status mode owner group filename"
  40. echo "-----------------------------------------"
  41. XCOMM exists correct correct correct /usr/dt/foo1
  42. XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
  43. XCOMM exists the link is correct /usr/dt/link
  44. while read -r SRC
  45. do
  46. #include "verify.func"
  47. done <<-EOF
  48. #include "CDE-FONTS.lst"
  49. EOF
  50. }
  51. #include "option.func"
  52. XCOMM ##########################################################################
  53. XCOMM
  54. XCOMM Main Body
  55. XCOMM
  56. XCOMM ##########################################################################
  57. retval=0
  58. CDE_TOP=CDE_INSTALLATION_TOP
  59. HandleOption "$*"
  60. if [ "$OPERATION" = "deconfigure" ]
  61. then
  62. echo "de-Configuring for CDE-FONTS..."
  63. RemoveFontFiles
  64. VerifyInstalledFiles
  65. elif [ "$OPERATION" = "verify" ]
  66. then
  67. VerifyInstalledFiles
  68. fi
  69. return $retval