configShlibs.src 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 -r 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" || exit
  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 -r 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 || exit
  51. for lib in $(/bin/ls lib*.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. retval=0
  64. CDE_TOP=CDE_INSTALLATION_TOP
  65. HandleOption $*
  66. if [ "$OPERATION" = "deconfigure" ]
  67. then
  68. echo "de-Configuring for CDE-SHLIBS..."
  69. RemoveShlibFiles
  70. VerifyInstalledFiles
  71. elif [ "$OPERATION" = "configure" ]
  72. then
  73. MakeTheLink
  74. elif [ "$OPERATION" = "verify" ]
  75. then
  76. VerifyInstalledFiles
  77. fi
  78. return $retval