configRun.src 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-RUN
  5. XCOMM customize
  6. XCOMM @(#) $XConsortium: configRun.src /main/6 1996/10/18 16:30:22 drk $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. #define HASH #
  13. #define STAR *
  14. CreateAppConfigDirectory()
  15. {
  16. HASH
  17. HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
  18. HASH all of its subdirectories
  19. HASH
  20. cd $DT_CONFIG_TOP
  21. if [ ! -d $APPCONFIG ]
  22. then
  23. mkdir $APPCONFIG
  24. fi
  25. cd $APPCONFIG
  26. for i in $APPCONFIG_DIRS
  27. do
  28. if [ ! -d $i ]
  29. then
  30. mkdir $i
  31. fi
  32. cd $i
  33. XCOMM
  34. HASH for each locale
  35. HASH
  36. for j in $DT_TOP/$APPCONFIG/$i/STAR
  37. do
  38. if [ ! -d `basename $j` ]
  39. then
  40. mkdir `basename $j`
  41. fi
  42. done
  43. cd ..
  44. done
  45. }
  46. LinkOtherIcons()
  47. {
  48. while read SRC
  49. do
  50. rm -f $DT_TOP/$APPCONFIG/icons/C/F$SRC
  51. ln -s $DT_TOP/$APPCONFIG/icons/C/$SRC $DT_TOP/$APPCONFIG/icons/C/F$SRC
  52. done <<-EOF
  53. fphelp.t.pm
  54. help.t.pm
  55. paint.l.pm
  56. paint.m.pm
  57. paint.t.pm
  58. penpad.t.pm
  59. term.t.pm
  60. EOF
  61. }
  62. XCOMM ##########################################################################
  63. XCOMM
  64. XCOMM Main Body
  65. XCOMM
  66. XCOMM ##########################################################################
  67. PRODUCT=CDE
  68. FILESET=CDE-RUN
  69. DT_TOP=CDE_INSTALLATION_TOP
  70. DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
  71. DT_TEMP_TOP=CDE_LOGFILES_TOP
  72. ROOT=/
  73. retval=0
  74. APPCONFIG=appconfig
  75. APPCONFIG_DIRS="appmanager help icons types"
  76. PRINTERS=""
  77. DEFAULT_PRINTER="Default_Print"
  78. HASH
  79. HASH create the CDE_LOGFILES_TOP directory
  80. HASH
  81. if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ]
  82. then
  83. mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
  84. fi
  85. mv $APPCONFIG/appmanager .hidden-appmanager
  86. chmod -R 755 $DT_TEMP_TOP/STAR
  87. chmod 755 $DT_TEMP_TMP/.hidden-appmanager
  88. chown -R bin $DT_TEMP_TOP/STAR
  89. chgrp -R bin $DT_TEMP_TOP/STAR
  90. mv $DT_TEMP_TMP/.hidden-appmanager $DT_TEMP_TMP/$APPCONFIG/appmanager
  91. chmod 755 $DT_TEMP_TOP
  92. chown bin $DT_TEMP_TOP
  93. chgrp bin $DT_TEMP_TOP
  94. HASH
  95. HASH create the CDE_CONFIGURATION_TOP and its config directory
  96. HASH
  97. if [ ! -d $DT_CONFIG_TOP ]
  98. then
  99. mkdir -p $DT_CONFIG_TOP
  100. fi
  101. if [ ! -d $DT_CONFIG_TOP/config ]
  102. then
  103. mkdir -p $DT_CONFIG_TOP/config
  104. fi
  105. CreateAppConfigDirectory
  106. cd $DT_TOP/$APPCONFIG/appmanager
  107. HASH
  108. HASH for each locale
  109. HASH
  110. for i in *
  111. do
  112. if [ -d $i ]
  113. then
  114. cd $i
  115. HASH
  116. HASH for each directory in the locale, check for a
  117. HASH localized version of the Printers directory
  118. HASH and for the file lp_Print within that directory
  119. HASH
  120. for j in *
  121. do
  122. if [ -f $j/$DEFAULT_PRINTER ]
  123. then
  124. PRINTERS=$j
  125. HASH make the equivalent directory in the configuration
  126. HASH directory
  127. if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i ]
  128. then
  129. mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
  130. fi
  131. cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
  132. if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS ]
  133. then
  134. mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
  135. fi
  136. cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
  137. HASH now copy the file over from the installation dirctory
  138. HASH if it is not already present.
  139. if [ ! -f $DEFAULT_PRINTER ]
  140. then
  141. cp $DT_TOP/$APPCONFIG/appmanager/$i/$PRINTERS/$DEFAULT_PRINTER .
  142. fi
  143. cd $DT_TOP/$APPCONFIG/appmanager/$i
  144. fi
  145. done
  146. cd $DT_TOP/$APPCONFIG/appmanager
  147. fi
  148. done
  149. HASH
  150. HASH Configure Xsession.d
  151. HASH
  152. cd $DT_CONFIG_TOP/config
  153. if [ ! -d Xsession.d ]
  154. then
  155. mkdir Xsession.d
  156. fi
  157. chmod -R 755 $DT_CONFIG_TOP
  158. LinkOtherIcons
  159. HASH
  160. HASH mkProd can't seem to handle a mode of 2555 so
  161. HASH do it here
  162. HASH
  163. chmod 2555 $DT_TOP/bin/dtmail
  164. return $retval