configHelp.src 1.7 KB

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