configTT.src 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-TT
  5. XCOMM configure
  6. XCOMM @(#) $TOG: configTT.src /main/1 1998/03/11 16:18:40 mgreess $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. #define HASH #
  13. retval=0
  14. RemoveTTFiles()
  15. {
  16. while read -r 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" || exit
  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-TT.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 -r SRC
  45. do
  46. #include "../verify.func"
  47. done <<-EOF
  48. #include "CDE-TT.lst"
  49. EOF
  50. }
  51. #include "../option.func"
  52. XCOMM ######################################################################
  53. XCOMM
  54. XCOMM Main Body
  55. XCOMM
  56. XCOMM ######################################################################
  57. HandleOption "$*"
  58. if [ "$OPERATION" = "configure" ]
  59. then
  60. return 0
  61. elif [ "$OPERATION" = "deconfigure" ]
  62. then
  63. RemoveTTFiles
  64. VerifyInstalledFiles
  65. elif [ "$OPERATION" = "verify" ]
  66. then
  67. VerifyInstalledFiles
  68. fi
  69. return $retval