configHelpPrg.src 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-HELP
  5. XCOMM customize
  6. XCOMM @(#) $XConsortium: configHelpPrg.src /main/4 1996/04/23 19:32:56 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-PRG.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 <<-EOF1
  47. #include "CDE-HELP-PRG.lst"
  48. EOF1
  49. }
  50. #include "option.func"
  51. XCOMM ##########################################################################
  52. XCOMM
  53. XCOMM Main Body
  54. XCOMM
  55. XCOMM ##########################################################################
  56. PRODUCT=CDE
  57. FILESET=CDE-HELP
  58. retval=0
  59. CDE_TOP=CDE_INSTALLATION_TOP
  60. CDE_CONF_TOP=CDE_CONFIGURATION_TOP
  61. HandleOption $*
  62. if [ "$OPERATION" = "deconfigure" ]
  63. then
  64. echo "de-Configuring for CDE-HELP-PRG..."
  65. RemoveHelpFiles
  66. VerifyInstalledFiles
  67. elif [ "$OPERATION" = "verify" ]
  68. then
  69. VerifyInstalledFiles
  70. fi
  71. return $retval