configShlibs.src 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-SHLIBS
  5. XCOMM customize
  6. XCOMM @(#) $XConsortium: configShlibs.src /main/4 1996/04/23 19:33:43 drk $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. #define STAR *
  13. XCOMM ############################################
  14. RemoveShlibFiles()
  15. {
  16. while read 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
  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-SHLIBS.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 SRC
  45. do
  46. #include "verify.func"
  47. done <<-EOF
  48. #include "CDE-SHLIBS.lst"
  49. EOF
  50. }
  51. #include "option.func"
  52. XCOMM #########################################################################
  53. XCOMM
  54. XCOMM Main Body
  55. XCOMM
  56. XCOMM #########################################################################
  57. PRODUCT=CDE
  58. FILESET=CDE-SHLIBS
  59. retval=0
  60. CDE_TOP=CDE_INSTALLATION_TOP
  61. CDE_CONF_TOP=CDE_CONFIGURATION_TOP
  62. HandleOption $*
  63. if [ "$OPERATION" = "deconfigure" ]
  64. then
  65. echo "de-Configuring for CDE-SHLIBS..."
  66. RemoveShlibFiles
  67. VerifyInstalledFiles
  68. elif [ "$OPERATION" = "verify" ]
  69. then
  70. VerifyInstalledFiles
  71. fi
  72. return $retval