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 $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 $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 = "UNIX_SV" ];
160 PLATFORM_SCRIPT_DIR=usl
161 elif [ $BUILDSYSTEM = "UNIX_System_V" ];
164 PLATFORM_SCRIPT_DIR=uxp
165 elif [ $BUILDSYSTEM = "OSF1" ];
168 PLATFORM_SCRIPT_DIR=dec
169 else # Build system = HP
171 PLATFORM_SCRIPT_DIR=hp
174 if [ "$PLATFORM" = "aix" ];
177 elif [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ];
179 USER=`/usr/ucb/whoami`
181 USER=`/usr/bin/whoami`
184 if [ "$USER" != "root" ];
188 echo "You must be root to run this script"
193 PATH=/bin:/usr/bin:/etc:/usr/bin/X11:
198 USE_ALTERNATE_UDB_DIR="no"
209 rm -f /tmp/dinstallCDE.log
211 Log "Options specified..."
212 while [ $# -ne 0 ]; do
214 -a) Log " - alternate place to get the udb files from"
221 USE_ALTERNATE_UDB_DIR="yes"
224 -f) Log " - load specific filesets"
233 -clean) Log " - delete all three cde directories"
238 -cleanVar) Log " - delete only temporary and installation directories"
242 -relative) Log " - run the relative-located config scripts"
246 -prog) Log " - remove only the development environment"
250 -runtime) Log " - remove only the runtime environment"
254 -lang) Log " - configure backdrops and palettes for LANG"
268 TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
269 if [ "$USE_RELATIVE" = "yes" ]
271 POST_INSTALL_DIR=../post_install
273 POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
276 if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
278 DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
280 DATABASE_DIR=$BUILD_TREE/databases
283 if [ "$DATABASE_FILES" = "" ]
285 if [ "$DEVELOP_ENV" = "yes" -a "$RUNTIME_ENV" = "yes" ]
287 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
288 CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
289 CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
291 elif [ "$DEVELOP_ENV" = "yes" ]
293 DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
294 CDE-MAN-DEV CDE-SHLIBS"
295 elif [ "$RUNTIME_ENV" = "yes" ]
297 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
298 CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS"
302 INSTALL_LOCATION=CDE_INSTALLATION_TOP
303 CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
304 LOGFILES_LOCATION=CDE_LOGFILES_TOP
310 echo "See /tmp/dinstallCDE.log for a log of this de-install session."