2 XCOMM $XConsortium: dinstallCDE.src /main/8 1996/11/25 14:20:36 drk $
5 XCOMM This script uses the 'CDE' configuration scripts to de-install the Desktop
8 XCOMM this script accepts the following parameters:
10 XCOMM Optional parameters:
12 XCOMM -f <filesets> -- a quoted, space-separated list of
13 XCOMM filesets to unload. The .udb
14 XCOMM extension is not required.
16 XCOMM -clean -- remove the temporaray and configuration directories
17 XCOMM -cleanVar-- remove the temporary directory but NOT the
18 XCOMM configuration directory
19 XCOMM -prog -- load only the development environment
20 XCOMM -runtime -- load only the runtime environment
22 XCOMM ##########################################################################
27 REVISION="$(echo "$Revision: /main/8 $" | awk '{print $2}')"
31 echo "$1" | tee -a /tmp/dinstallCDE.log
39 ScriptName=$2 # use long config file name (configFoo)
41 test_string=${DATABASE_FILES#*$FilesetName}
42 if (( ${#DATABASE_FILES} > ${#test_string} ))
44 if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
46 Log "Executing $PLATFORM specific $FilesetName de-customize script"
47 $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -d 2>&1 | \
48 tee -a /tmp/$ScriptName.dverify
49 elif [ -x $POST_INSTALL_DIR/$ScriptName ]
51 Log "Executing $FilesetName de-customize script"
52 $POST_INSTALL_DIR/$ScriptName -d 2>&1 | tee -a /tmp/$ScriptName.dverify
61 if [ "$BUILD_TREE" = "" ]; then
62 ScriptName=$2 # use short config file name (foo.cfg)
64 ScriptName=$1 # use long config file name (configFoo)
67 if [ $CDECONFIGDIR = "CONFIG" ]; then
71 if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
73 Log "Executing $PLATFORM specific $FilesetName de-customize script"
74 KORNSHELL $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -d $3 2>&1 | \
75 tee -a /tmp/$ScriptName.dverify
76 elif [ -x $POST_INSTALL_DIR/$ScriptName ]
78 Log "Executing $FilesetName de-customize script"
79 KORNSHELL $POST_INSTALL_DIR/$ScriptName -d $3 2>&1 | tee -a /tmp/$ScriptName.dverify
87 DoFilesetScript CDE-TT configTT tt.cfg
88 DoFilesetScript CDE-MIN configMin min.cfg
89 DoFilesetScript CDE-RUN configRun run.cfg
90 DoFilesetScript CDE-HELP-C configHelp help.cfg
91 DoFilesetScript CDE-HELP-PRG configHelpPrg helpprg.cfg
92 DoFilesetScript CDE-HELP-RUN configHelpRun helprun.cfg
93 DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
94 DoFilesetScript CDE-DEMOS configDemos demos.cfg
95 DoFilesetScript CDE-FONTS configFonts fonts.cfg
96 DoFilesetScript CDE-ICONS configIcons icons.cfg
97 DoFilesetScript CDE-INC configInc inc.cfg
98 DoFilesetScript CDE-MAN configMan man.cfg
99 DoFilesetScript CDE-MAN-DEV configManDev mandev.cfg
100 DoFilesetScript CDE-MSG-C configMsgCat msgcat.cfg
101 DoFilesetScript CDE-PRG configPrg prg.cfg
103 HASH see if a lang has been specified and configure backdrops and
104 HASH palettes if it has.
106 if [ "$LangOption" != "" ]
108 DoLangScript configLang lang.cfg $theLang
115 echo "Usage: $(basename $0) [options]"
119 echo "\t[-a <udb directory>]\t\talternate place to get the"
120 echo "\t\t\t\t\tudb files from."
121 echo "\t[-f <filesets>]\t\t\tspecify filesets to be unloaded."
122 echo "\t\t\t\t\tThe list should be double-quoted,"
123 echo "\t\t\t\t\tspace-separated, with no .udb"
124 echo "\t\t\t\t\textensions."
126 echo "\t[-clean]\t\t\tremove the temporary and configuration"
127 echo "\t\t\t\t\tdirectories"
128 echo "\t[-cleanVar]\t\t\tremove the temporary but NOT the "
129 echo "\t\t\t\t\tconfiguration directory"
130 echo "\t[-prog]\t\t\t\tload only the development environment"
131 echo "\t[-runtime]\t\t\tload only the runtime environment"
132 echo "\t[-relative]\t\t\trun the relative-located config scripts"
133 echo "\t[-lang LANG]\t\t\tspecify LANG to use for backdrops and"
134 echo "\t\t\t\t\tpalettes"
138 ORIGINAL_COMMAND_LINE="$*"
140 XCOMM Set which system we are on
144 PLATFORM_SCRIPT_DIR=""
149 if [ $BUILDSYSTEM = "AIX" ];
152 PLATFORM_SCRIPT_DIR=ibm
153 elif [ $BUILDSYSTEM = "SunOS" ];
156 PLATFORM_SCRIPT_DIR=sun
157 elif [ $BUILDSYSTEM = "OSF1" ];
160 PLATFORM_SCRIPT_DIR=dec
161 else # Build system = HP
163 PLATFORM_SCRIPT_DIR=hp
166 if [ "$PLATFORM" = "aix" ];
169 elif [ "$PLATFORM" = "sun" ];
171 USER=`/usr/ucb/whoami`
173 USER=`/usr/bin/whoami`
176 if [ "$USER" != "root" ];
180 echo "You must be root to run this script"
185 PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
190 USE_ALTERNATE_UDB_DIR="no"
201 rm -f /tmp/dinstallCDE.log
203 Log "Options specified..."
204 while [ $# -ne 0 ]; do
206 -a) Log " - alternate place to get the udb files from"
213 USE_ALTERNATE_UDB_DIR="yes"
216 -f) Log " - load specific filesets"
225 -clean) Log " - delete all three cde directories"
230 -cleanVar) Log " - delete only temporary and installation directories"
234 -relative) Log " - run the relative-located config scripts"
238 -prog) Log " - remove only the development environment"
242 -runtime) Log " - remove only the runtime environment"
246 -lang) Log " - configure backdrops and palettes for LANG"
260 TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
261 if [ "$USE_RELATIVE" = "yes" ]
263 POST_INSTALL_DIR=../post_install
265 POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
268 if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
270 DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
272 DATABASE_DIR=$BUILD_TREE/databases
275 if [ "$DATABASE_FILES" = "" ]
277 if [ "$DEVELOP_ENV" = "yes" -a "$RUNTIME_ENV" = "yes" ]
279 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
280 CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
281 CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
283 elif [ "$DEVELOP_ENV" = "yes" ]
285 DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
286 CDE-MAN-DEV CDE-SHLIBS"
287 elif [ "$RUNTIME_ENV" = "yes" ]
289 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
290 CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS"
294 INSTALL_LOCATION=CDE_INSTALLATION_TOP
295 CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
296 LOGFILES_LOCATION=CDE_LOGFILES_TOP
302 echo "See /tmp/dinstallCDE.log for a log of this de-install session."