2 XCOMM $XConsortium: installCDE.src /main/20 1996/11/25 14:21:13 drk $
5 XCOMM This script uses the 'CDE' databases to install either the Desktop
6 XCOMM environment on a specified machine or creates a tar ball to be used
7 XCOMM in an install process.
9 XCOMM this script accepts the following parameters:
10 XCOMM -s <source> -- The top of build tree where the files are
12 XCOMM -z <package> -- The desktop install package
14 XCOMM Optional parameters:
16 XCOMM -t <package destination> -- where to store install package
17 XCOMM -pI <actual install location> -- where CDE_INSTALLATION_TOP will be linked to.
18 XCOMM -pC <actual config location> -- where CDE_CONFIGURATION_TOP will be linked to.
19 XCOMM -pV <actual var location> -- where CDE_LOGFILES_TOP will be linked to.
20 XCOMM -a <alternate udb directory>
21 XCOMM -f <filesets> -- a quoted, space-separated list of
22 XCOMM filesets to load. The .udb extension
23 XCOMM is not required.
25 XCOMM -clean -- remove the temporary, configuration and installation
27 XCOMM -cleanTwo-- remove the temporary and installation directories
28 XCOMM but NOT the configuration directory
29 XCOMM -cleanEtc-- remove the configuration directories
30 XCOMM -prog -- load only the development environment
31 XCOMM -runtime -- load only the runtime environment
32 XCOMM -pack -- create packing list
33 XCOMM -pseudo -- don't configure the desktop
34 XCOMM -nocompress -- don't compress the tarball (-t only)
36 XCOMM -lang -- load the localized filesets
37 XCOMM -LinkStepOnly -- set up the -pI, -pC, and -pV links
39 XCOMM -DontRunScripts -- stop after installation
40 XCOMM -RunScriptsOnly -- only execute the scripts
41 XCOMM -configureOnly -- only configure the desktop
43 XCOMM ##########################################################################
48 HASH ksh bug: . and .. are not excluded if FIGNORE is set
51 LOGFILE="installCDE.$$.log"
55 echo "$1" | tee -a $LOGFILE
60 Log "\nGenerating UNIX Desktop install package $DATE in $TARBALL_LOCATION"
62 HASH create installable tarball
64 Log "Creating tarball..."
67 mkdir -p "$TARBALL_LOCATION/$DIRNAME"
69 echo "$DATE" >"$LOGFILES_LOCATION/.build.$DATE"
70 chown bin "$LOGFILES_LOCATION/.build.$DATE"
72 if [ "$COMPRESS_TARBALL" = "yes" ]; then
73 tar -cf - "$INSTALL_LOCATION/STAR" \
74 2>"$TARBALL_LOCATION/$DIRNAME/extract.err" |
75 compress -c >"$TARBALL_LOCATION/$DIRNAME/dttar.Z"
77 tar -cf "$TARBALL_LOCATION/$DIRNAME/dt.tar" \
78 "$INSTALL_LOCATION/STAR" \
79 2>"$TARBALL_LOCATION/$DIRNAME/extract.err" 2>&1
82 if [ "$ACTUAL_INSTALLATION_LOC" = "" ]; then
83 actualInstallDir=$INSTALL_LOCATION
85 actualInstallDir=$ACTUAL_INSTALLATION_LOC
87 let size=$(du -s "$actualInstallDir" | awk '{print $1}')*512
89 HASH load installation fileset *after* tarball generated
90 LoadFileSet "" "CDE-INSTALL"
92 HASH create config dir
93 destPost=$TARBALL_LOCATION/$DIRNAME/config
96 HASH copy config and platform config scripts
97 src=$INSTALL_LOCATION/install/$PLATFORM_SCRIPT_DIR
98 cp "$src/config/STAR.cfg" "$destPost"
100 HASH copy this script and install.dt platform overrides
101 cp "$src/install.dto" "$TARBALL_LOCATION/$DIRNAME/install.dto"
102 cp "$src/install.cde" "$TARBALL_LOCATION/$DIRNAME/install.cde"
103 chmod 755 "$TARBALL_LOCATION/$DIRNAME/install.cde"
109 cat >"$TARBALL_LOCATION/$DIRNAME/dt.pkg" <<FIN
112 COMPRESSED: $COMPRESS_TARBALL
114 CL: $ORIGINAL_COMMAND_LINE
115 FILESETS: $DATABASE_FILES
118 cat >"$TARBALL_LOCATION/$DIRNAME/build.status" <<FIN
122 OVERALL STATUS: <not yet tested>
123 OVERALL PERFORMANCE: <not yet tested>
124 MAJOR PROBLEMS: <not yet tested>
128 chmod g+w "$TARBALL_LOCATION/$DIRNAME/build.status"
136 if [ "$BUILD_TREE" = "" ]; then
137 ScriptName=$3 # use short config file name (foo.cfg)
139 ScriptName=$2 # use long config file name (configFoo)
142 if [ "$CDECONFIGDIR" = "CONFIG" ]; then
143 typeset -u ScriptName
146 test_string=${DATABASE_FILES#*$FilesetName}
147 if (( ${#DATABASE_FILES} > ${#test_string} ))
149 if [ -x "$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName" ]
151 Log "Executing $PLATFORM specific $FilesetName customize script"
152 KORNSHELL "$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName" -e 2>&1 | \
154 elif [ -x "$POST_INSTALL_DIR/$ScriptName" ]
156 Log "Executing $FilesetName customize script"
157 KORNSHELL "$POST_INSTALL_DIR/$ScriptName" -e 2>&1 | tee -a $LOGFILE
166 DoFilesetScript CDE-TT configTT tt.cfg
167 DoFilesetScript CDE-MIN configMin min.cfg
168 DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
169 DoFilesetScript CDE-RUN configRun run.cfg
175 Log "Creating packing list."
176 touch "$INSTALL_LOCATION/Packing_list"
177 for i in $DATABASE_FILES
180 KORNSHELL "$TOOL_DIR/udbToAny.ksh" -toDB -ReleaseStream "$PLATFORM" "$DATABASE_DIR/${i}.udb" > "/tmp/${i}.db"
181 if [ -r "/tmp/${i}.db" ]
183 grep -F install_target "/tmp/${i}.db" | cut -sf 2 -d '\: ' < file | while IFS= read -r line
185 echo "$line" >>"$INSTALL_LOCATION/Packing_list"
193 HASH kill these processes so that they can be removed and new ones
196 for i in inetd rpc.ttdbserver rpc.cmsd
198 if [ "$PLATFORM" = "aix" ] && [ $i = "inetd" ]
200 if ! lssrc -s inetd >/dev/null 2>&1
202 stopsrc -s inetd >>$LOGFILE 2>&1
205 ps -eo pid,comm | grep $i | awk '{print "kill " $1}' | /bin/sh
212 HASH now restart inetd
216 if [ "$PLATFORM" = "sun" ]
218 /usr/sbin/svcadm refresh svc:/network/inetd:default
219 /usr/sbin/svcadm restart svc:/network/inetd:default
220 elif [ "$PLATFORM" = "aix" ]
222 startsrc -s inetd >>$LOGFILE 2>&1
223 elif [ "$PLATFORM" = "openbsd" ] || [ "$PLATFORM" = "netbsd" ]
225 /etc/rc.d/inetd start >/dev/null
226 elif [ "$PLATFORM" = "freebsd" ]
228 /etc/rc.d/inetd onestart
229 elif [ "$PLATFORM" = "linux" ]
231 /etc/init.d/openbsd-inetd start >/dev/null 2>&1
239 cd "$OLDPWD" || exit 1
242 CheckForActualLocations()
245 XCOMM if different actual locations specified, set up the links
249 if [ "$CLEAN_DAEMONS" = "yes" ]
254 HASH remove the contents of the installation directory then the directory
257 if [ "$CLEANING" = "yes" ]
259 Log "Removing $INSTALL_LOCATION contents... "
260 if [ -d "$INSTALL_LOCATION" ]
262 rm -rf "${INSTALL_LOCATION:?}/"STAR
263 if [ "$LeaveLinks" = "yes" ]
265 if [ ! -L "$INSTALL_LOCATION" ]
267 rm -rf "$INSTALL_LOCATION"
270 if [ -L "$INSTALL_LOCATION" ]
272 rm -f "$INSTALL_LOCATION"
274 rm -rf "$INSTALL_LOCATION"
280 if [ "$CONFIGURE_ONLY" = "no" ]
282 if [ "$ACTUAL_INSTALLATION_LOC" != "" ]
286 HASH first create the actual directory - if not there
289 if [ ! -d "$ACTUAL_INSTALLATION_LOC" ]
291 mkdir -p "$ACTUAL_INSTALLATION_LOC"
292 if [ ! -d "$ACTUAL_INSTALLATION_LOC" ]
294 Log "cannot create $ACTUAL_INSTALLATION_LOC directory"
299 ln -s "$ACTUAL_INSTALLATION_LOC" "$INSTALL_LOCATION"
302 if [ ! -d "$INSTALL_LOCATION" ] && [ ! -L "$INSTALL_LOCATION" ];
304 mkdir -p "$INSTALL_LOCATION"
309 if [ "$CLEAN_DAEMONS" = "yes" ]
314 HASH remove the contents of the configuration directory
316 if [ "$CLEANING_ETC" = "yes" ]
318 Log "Removing $CONFIGURE_LOCATION contents... "
319 if [ -d "$CONFIGURE_LOCATION" ]
321 rm -rf "${CONFIGURE_LOCATION:?}/"STAR
322 if [ "$LeaveLinks" = "yes" ]
324 if [ ! -L "$CONFIGURE_LOCATION" ]
326 rm -rf "$CONFIGURE_LOCATION"
329 if [ -L "$CONFIGURE_LOCATION" ]
331 rm -f "$CONFIGURE_LOCATION"
333 rm -rf "$CONFIGURE_LOCATION"
339 if [ "$ACTUAL_CONFIGURATION_LOC" != "" ]
341 if [ ! -d "$ACTUAL_CONFIGURATION_LOC" ]
343 mkdir -p "$ACTUAL_CONFIGURATION_LOC"
344 if [ ! -d "$ACTUAL_CONFIGURATION_LOC" ]
346 Log "cannot create $ACTUAL_CONFIGURATION_LOC directory"
351 ln -s "$ACTUAL_CONFIGURATION_LOC" "$CONFIGURE_LOCATION"
354 if [ ! -d "$CONFIGURE_LOCATION" ] && [ ! -L "$CONFIGURE_LOCATION" ];
356 mkdir -p "$CONFIGURE_LOCATION"
360 if [ "$CLEANING" = "yes" ]
362 Log "Removing $LOGFILES_LOCATION contents... "
363 if [ -d "$LOGFILES_LOCATION" ]
365 rm -rf "${LOGFILES_LOCATION:?}/"STAR
366 if [ "$LeaveLinks" = "yes" ]
368 if [ ! -L "$LOGFILES_LOCATION" ]
370 rm -rf "$LOGFILES_LOCATION"
373 if [ -L "$LOGFILES_LOCATION" ]
375 rm -f "$LOGFILES_LOCATION"
377 rm -rf "$LOGFILES_LOCATION"
383 if [ "$ACTUAL_VAR_LOC" != "" ]
385 if [ ! -d "$ACTUAL_VAR_LOC" ]
387 mkdir -p "$ACTUAL_VAR_LOC"
388 if [ ! -d "$ACTUAL_VAR_LOC" ]
390 Log "cannot create $ACTUAL_VAR_LOC directory"
395 ln -s "$ACTUAL_VAR_LOC" "$LOGFILES_LOCATION"
398 if [ ! -d "$LOGFILES_LOCATION" ] && [ ! -L "$LOGFILES_LOCATION" ];
400 mkdir -p "$LOGFILES_LOCATION"
409 echo -e "Usage: $(basename "$0") {-s <source>|-z <package>} [options]"
411 echo -e "\t-s <source>\t\t\tthe top of the build tree"
412 echo -e "\t-z <package>\t\tthe desktop install package"
416 echo -e "\t[-t <package_destination>]\tif specified create an"
417 echo -e "\t\t\t\t\tinstall package and store it in the"
418 echo -e "\t\t\t\t\tdestination."
419 echo -e "\t[-pI <actual install location>]\twhere" CDE_INSTALLATION_TOP "will be linked to."
420 echo -e "\t[-pC <actual config location>]\twhere" CDE_CONFIGURATION_TOP "will be linked to."
421 echo -e "\t[-pV <actual var location>]\twhere" CDE_LOGFILES_TOP "will be linked to."
423 echo -e "\t[-a <udb directory>]\t\talternate place to get the"
424 echo -e "\t\t\t\t\tudb files from."
425 echo -e "\t[-f <filesets>]\t\t\tspecify filesets to be loaded."
426 echo -e "\t\t\t\t\tThe list should be double-quoted,"
427 echo -e "\t\t\t\t\tspace-separated, with no .udb"
428 echo -e "\t\t\t\t\textensions."
430 echo -e "\t[-clean]\t\t\tremove the temporary, configuration, and"
431 echo -e "\t\t\t\t\tinstallation directory"
432 echo -e "\t[-cleanTwo]\t\t\tremove the temporary and installation "
433 echo -e "\t\t\t\t\tdirectory, but NOT the configuration directory"
434 echo -e "\t[-cleanEtc]\t\t\tremove the configuration directory, but "
435 echo -e "\t\t\t\t\NOT the temporary and installation directories"
436 echo -e "\t[-prog]\t\t\t\tload only the development environment"
437 echo -e "\t[-runtime]\t\t\tload only the runtime environment"
438 echo -e "\t[-relative]\t\t\trun the relative-located config scripts"
439 echo -e "\t[-pack]\t\t\t\tcreate a packing list"
440 echo -e "\t[-pseudo]\t\t\tdo not configure desktop when installing"
441 echo -e "\t[-nocompress]\t\t\tdo not compress tarball when creating package"
442 echo -e "\t[-lang LANG]\t\t\tspecify LANG to load only appropriate localized"
443 echo -e "\t\t\t\t\tfilesets for LANG"
444 echo -e "\t[-LeaveLinks]\t\t\t\tdo not delete the links after cleaning"
446 echo -e "\t[-LinkStepOnly]\t\t\tset up the -pI, -pC, and -pV links"
447 echo -e "\t\t\t\t\tthen exit"
448 echo -e "\t[-DontRunScripts]\t\tstop after installation"
449 echo -e "\t[-RunScriptsOnly]\t\tonly execute the scripts"
450 echo -e "\t[-configureOnly]\t\tonly configure the desktop"
451 echo -e "\t[-destdir dir]\t\tInstall all files under dir/"
453 echo -e "\tExamples:"
455 echo -e "\tinstallCDE -s /x/cde_hp700_90"
456 echo -e "\tinstallCDE -s /x/cde_aix_32 -f \"CDE_MIN CDE-SHLIBS\""
457 echo -e "\tinstallCDE -s /x/cde_sun_52 -pI /bigdisk/opt/dt -clean"
458 echo -e "\tinstallCDE -s /x/cde_sun_52 -pI /dtinstall -clean\\"
459 echo -e "\t\t-pseudo -t /dtpackages -nocompress"
463 XCOMM LoadFileSet() - load a UDB file
464 XCOMM $1 - fileset number
465 XCOMM $2 - fileset name
469 if [ "$1" = "" ]; then
475 XCOMM don't bother if the fileset doesn't exist
476 if [ ! -e "$DATABASE_DIR/${2}.udb" ]
481 Log " $num installing database $2"
482 Log " - creating ${2}.lst file"
483 KORNSHELL "$TOOL_DIR/udbToAny.ksh" -toLst -ReleaseStream "$PLATFORM" \
484 "$DATABASE_DIR/${2}.udb" > "/tmp/${2}.lst"
485 Log " - installing ... "
486 KORNSHELL "$TOOL_DIR/mkProd" -D "$DESTINATION_DIR" -S "$BUILD_TREE" "/tmp/${2}.lst" \
487 2>"/tmp/${2}.err" 1>"/tmp/${2}.good"
490 Log " - checking for errors ..."
491 rm -f "/tmp/${2}.missing"
492 awk '{if ($1 == "ERROR:") print " " $4}' \
493 "/tmp/${2}.err" >> "/tmp/${2}.missing"
494 if [ -s "/tmp/${2}.missing" ]
496 Log " - missing files:"
497 cat "/tmp/${2}.missing" | tee -a "$LOGFILE"
500 ORIGINAL_COMMAND_LINE="$*"
502 XCOMM Set which system we are on
506 PLATFORM_SCRIPT_DIR=""
511 if [ "$BUILDSYSTEM" = "AIX" ];
514 PLATFORM_SCRIPT_DIR=ibm
515 elif [ "$BUILDSYSTEM" = "SunOS" ];
518 PLATFORM_SCRIPT_DIR=sun
519 elif [ "$BUILDSYSTEM" = "Linux" ];
522 PLATFORM_SCRIPT_DIR="linux"
523 elif [ "$BUILDSYSTEM" = "FreeBSD" ];
526 PLATFORM_SCRIPT_DIR="freebsd"
527 elif [ "$BUILDSYSTEM" = "OpenBSD" ];
530 PLATFORM_SCRIPT_DIR="openbsd"
531 elif [ "$BUILDSYSTEM" = "NetBSD" ];
534 PLATFORM_SCRIPT_DIR="netbsd"
535 else # Build system = HP
537 PLATFORM_SCRIPT_DIR=hp
540 if [ $(whoami) != "root" ];
543 echo "You should be root to run this script. Continuing anyway."
552 COMPRESS_TARBALL="yes"
553 USE_ALTERNATE_UDB_DIR="no"
558 ACTUAL_INSTALLATION_LOC=""
559 ACTUAL_CONFIGURATION_LOC=""
561 CREATE_PACKING_LIST="no"
562 DO_LINK_STEP_ONLY="no"
565 RUN_SCRIPTS_ONLY="no"
574 BUILT_LOCALES=builtLocales
575 Log "Built locales: $BUILT_LOCALES"
579 Log "Options specified..."
580 while [ $# -ne 0 ]; do
582 -s) Log " - get the build tree to extract from"
591 -z) Log " - get the install package to extract from"
600 -t) Log " - where to put the install package"
606 if [ "$SOURCE_TAR_FILE" = "" ]
613 -a) Log " - alternate place to get the udb files from"
620 USE_ALTERNATE_UDB_DIR="yes"
623 -f) Log " - load specific filesets"
632 -p) Log " - get all locations"
638 ACTUAL_INSTALLATION_LOC=$1
639 ACTUAL_CONFIGURATION_LOC=$1
643 -pI) Log " - get actual installation location"
649 ACTUAL_INSTALLATION_LOC=$1
652 -pC) Log " - get actual configuration location"
658 ACTUAL_CONFIGURATION_LOC=$1
661 -pV) Log " - get actual var location"
670 -clean) Log " - delete all three cde directories"
675 -cleanTwo) Log " - delete only temporary and installation directories"
679 -cleanEtc) Log " - delete only the configuration directory"
683 -prog) Log " - load only the development environment"
688 -runtime) Log " - load only the runtime environment"
693 -relative) Log " - run the relative-located config scripts"
697 -pack) Log " - create a packing list"
698 CREATE_PACKING_LIST="yes"
701 -LeaveLinks) Log " - do not remove the links"
705 -LinkStepOnly) Log " - do link step only"
706 DO_LINK_STEP_ONLY="yes"
709 -DontRunScripts) Log " - stop after installation"
710 DO_INSTALL_ONLY="yes"
713 -RunScriptsOnly) Log " - only run scripts"
714 RUN_SCRIPTS_ONLY="yes"
717 -pseudo) Log " - pseudo install"
723 -nocompress) Log " - do not compress tarball"
724 COMPRESS_TARBALL="no"
727 -lang) Log " - load localized filesets"
736 -configureOnly) Log " - Configure only"
741 -destdir) Log " - Destination Directory"
750 *) Log " - unknown option"
759 if [ -z "$BUILD_TREE" ] && [ -z "$TAR_TREE" ]
765 if [ "$BUILD_TREE" != "" ] && [ ! -d "$BUILD_TREE" ]
767 Log "Build tree does not exist."
771 if [ "$TAR_TREE" != "" ] && [ ! -d "$TAR_TREE" ]
773 Log "Tar tree does not exist."
777 if [ "$DESTINATION_DIR" != "" ] && [ ! -d "$DESTINATION_DIR" ]
779 Log "Creating $DESTINATION_DIR"
781 if ! mkdir "$DESTINATION_DIR"
783 Log "mkdir $DESTINATION_DIR failed"
794 XCOMM get the current time stamp if going to create a tarball
797 if [ $TARBALL = "yes" ];
799 set -- "$(/bin/date)"
803 if [ -z "$BUILD_TREE" ] && [ "${0##STAR/}" = INSTALL.CDE ]; then
804 typeset -u CDEPACKAGE
805 typeset -u CDETARFILE
806 typeset -u CDETARFILEZ
807 typeset -u CDECONFIGDIR
810 TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
811 if [ "$USE_RELATIVE" = "yes" ]
813 POST_INSTALL_DIR=../post_install
815 if [ -z "$BUILD_TREE" ]
817 POST_INSTALL_DIR=$TAR_TREE/$CDECONFIGDIR
819 POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
823 if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
825 DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
827 DATABASE_DIR=$BUILD_TREE/databases
830 if [ "$DATABASE_FILES" = "" ]
832 if [ "$DEVELOP_ENV" = "yes" ]
834 DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
835 CDE-MAN-DEV CDE-SHLIBS"
836 elif [ "$RUNTIME_ENV" = "yes" ]
838 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
839 CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS \
840 CDE-INFO CDE-INFOLIB-C"
842 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
843 CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
844 CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
845 CDE-FONTS CDE-INFO CDE-INFOLIB-C"
847 HASH now load any localized filesets
848 if [ "$DEVELOP_ENV" != "yes" ]
851 if [ "$theLang" != "" ]
853 DATABASE_FILES="$DATABASE_FILES CDE-$theLang CDE-MSG-$theLang \
856 HASH load all current (working) languages in $BUILT_LOCALES
859 if [ "${BUILT_LOCALES#*_DE}" != "$BUILT_LOCALES" ]
861 DATABASE_FILES="$DATABASE_FILES CDE-DE CDE-MSG-DE \
866 if [ "${BUILT_LOCALES#*_FR}" != "$BUILT_LOCALES" ]
868 DATABASE_FILES="$DATABASE_FILES CDE-FR CDE-MSG-FR \
873 if [ "${BUILT_LOCALES#*_IT}" != "$BUILT_LOCALES" ]
875 DATABASE_FILES="$DATABASE_FILES CDE-IT CDE-MSG-IT \
880 if [ "${BUILT_LOCALES#*_ES}" != "$BUILT_LOCALES" ]
882 DATABASE_FILES="$DATABASE_FILES CDE-ES CDE-MSG-ES \
891 [ -z "$INSTALL_LOCATION" ] && INSTALL_LOCATION=CDE_INSTALLATION_TOP
892 [ -z "$CONFIGURE_LOCATION" ] && CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
893 [ -z "$LOGFILES_LOCATION" ] && LOGFILES_LOCATION=CDE_LOGFILES_TOP
895 if [ -L $INSTALL_LOCATION ] && [ "$CONFIGURE_ONLY" != "yes" ]
897 touch $INSTALL_LOCATION/foo >/dev/null 2>/dev/null
898 if [ ! -f $INSTALL_LOCATION/foo ]
900 Log "Insufficient permissions to install CDE files in $INSTALL_LOCATION"
903 if [ ! -O $INSTALL_LOCATION/foo ]
905 Log "Root access to $INSTALL_LOCATION is required for CDE installation."
908 rm $INSTALL_LOCATION/foo
911 if [ -d $INSTALL_LOCATION ]
913 if [ -x $INSTALL_LOCATION/bin ] && [ ! -d $INSTALL_LOCATION/bin ]
915 rm -f $INSTALL_LOCATION/bin
919 if [ "$CONFIGURE_ONLY" = "yes" ]
921 CheckForActualLocations
923 Log "Configuration completed."
927 if [ "$RUN_SCRIPTS_ONLY" = "yes" ]
933 CheckForActualLocations
935 if [ "$DO_LINK_STEP_ONLY" = "yes" ]
940 if [ "$CREATE_PACKING_LIST" = "yes" ]
947 XCOMM we are ready to load the environment ...
950 if [ "$BUILD_TREE" != "" ]
952 Log "Load the Desktop from $BUILD_TREE"
954 cd "$STARTING_DIR" || exit 1
956 for i in $DATABASE_FILES
958 LoadFileSet "$j" "$i"
962 Log "Load the Desktop from $TAR_TREE"
963 compressed=$(awk '/COMPRESSED: /{print $2}' "$TAR_TREE/$CDEPACKAGE")
964 if [ "$compressed" = "yes" ]; then
965 uncompress <"$TAR_TREE/$CDETARFILEZ" | tar xvf - $INSTALL_LOCATION
967 tar -xvf "$TAR_TREE/$CDETARFILE" $INSTALL_LOCATION
969 DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' "$TAR_TREE/$CDEPACKAGE")
973 Log "Desktop installed in ${DESTINATION_DIR}${INSTALL_LOCATION}"
975 if [ "$DO_INSTALL_ONLY" = "yes" ]
980 if [ $TARBALL = "yes" ];
985 cd "$STARTING_DIR" || exit 1
987 if [ "$RUN_SCRIPTS" = "yes" ]
992 if [ "$REMOVE_LINKS" = "yes" ]
994 [ -L /usr/dt ] && rm /usr/dt
995 [ -L /etc/dt ] && rm /etc/dt
996 [ -L /var/dt ] && rm /var/dt
1001 echo "See $LOGFILE for a log of this install session."