configShlibs.src 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. XCOMM!/bin/ksh
  2. XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $
  3. #define STAR *
  4. XCOMM ############################################
  5. RemoveShlibFiles()
  6. {
  7. while read SRC
  8. do
  9. if [ "$SRC" != "" ]
  10. then
  11. rm -f $SRC
  12. dirname=${SRC%/STAR}
  13. if [ -d $dirname ]
  14. then
  15. cd $dirname
  16. while [ "$dirname" != "$CDE_TOP" ]
  17. do
  18. cd ..
  19. rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
  20. dirname=${dirname%/STAR}
  21. done
  22. fi
  23. fi
  24. done <<-EOF
  25. #include "CDE-SHLIBS.list"
  26. EOF
  27. }
  28. VerifyInstalledFiles()
  29. {
  30. echo "Status mode owner group filename"
  31. echo "-----------------------------------------"
  32. XCOMM exists correct correct correct /usr/dt/foo1
  33. XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
  34. XCOMM exists the link is correct /usr/dt/link
  35. while read SRC
  36. do
  37. #include "../verify.func"
  38. done <<-EOF
  39. #include "CDE-SHLIBS.lst"
  40. EOF
  41. }
  42. #include "../option.func"
  43. MakeTheLink()
  44. {
  45. XCOMM
  46. XCOMM Usage: configTT
  47. XCOMM
  48. XCOMM creates links in the install tree libtt.so -> libtt.so.1
  49. XCOMM
  50. cd CDE_INSTALLATION_TOP/lib
  51. for lib in `/bin/ls *.so.*`
  52. do
  53. link=`echo $lib | cut -d. -f1,2`
  54. rm -f $link
  55. ln -s $lib $link
  56. done
  57. }
  58. XCOMM #########################################################################
  59. XCOMM
  60. XCOMM Main Body
  61. XCOMM
  62. XCOMM #########################################################################
  63. PRODUCT=CDE
  64. FILESET=CDE-SHLIBS
  65. retval=0
  66. CDE_TOP=CDE_INSTALLATION_TOP
  67. CDE_CONF_TOP=CDE_CONFIGURATION_TOP
  68. HandleOption $*
  69. if [ "$OPERATION" = "deconfigure" ]
  70. then
  71. echo "de-Configuring for CDE-SHLIBS..."
  72. RemoveShlibFiles
  73. VerifyInstalledFiles
  74. elif [ "$OPERATION" = "configure" ]
  75. then
  76. MakeTheLink
  77. elif [ "$OPERATION" = "verify" ]
  78. then
  79. VerifyInstalledFiles
  80. fi
  81. return $retval