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"
53 REVISION="$(echo "$Revision: /main/20 $" | awk '{print $2}')"
57 /bin/echo "$1" | tee -a $LOGFILE
62 Log "\nGenerating UNIX Desktop install package $DATE in $TARBALL_LOCATION"
64 HASH create installable tarball
66 Log "Creating tarball..."
69 mkdir -p $TARBALL_LOCATION/$DIRNAME
71 echo $DATE >$LOGFILES_LOCATION/.build.$DATE
72 chown bin $LOGFILES_LOCATION/.build.$DATE
74 if [ "$COMPRESS_TARBALL" = "yes" ]; then
75 tar -cf - $INSTALL_LOCATION/STAR \
76 2>$TARBALL_LOCATION/$DIRNAME/extract.err |
77 compress -c >$TARBALL_LOCATION/$DIRNAME/dttar.Z
79 tar -cf $TARBALL_LOCATION/$DIRNAME/dt.tar \
80 $INSTALL_LOCATION/STAR \
81 2>$TARBALL_LOCATION/$DIRNAME/extract.err 2>&1
84 if [ "$ACTUAL_INSTALLATION_LOC" = "" ]; then
85 actualInstallDir=$INSTALL_LOCATION
87 actualInstallDir=$ACTUAL_INSTALLATION_LOC
89 let size=$(du -s $actualInstallDir | awk '{print $1}')*512
91 HASH load installation fileset *after* tarball generated
92 LoadFileSet "" "CDE-INSTALL"
94 HASH create config dir
95 destPost=$TARBALL_LOCATION/$DIRNAME/config
98 HASH copy config and platform config scripts
99 src=$INSTALL_LOCATION/install/$PLATFORM_SCRIPT_DIR
100 cp $src/config/STAR.cfg $destPost
102 HASH copy this script and install.dt platform overrides
103 cp $src/install.dto $TARBALL_LOCATION/$DIRNAME/install.dto
104 cp $src/install.cde $TARBALL_LOCATION/$DIRNAME/install.cde
105 chmod 755 $TARBALL_LOCATION/$DIRNAME/install.cde
111 cat >$TARBALL_LOCATION/$DIRNAME/dt.pkg <<FIN
115 COMPRESSED: $COMPRESS_TARBALL
117 CL: $ORIGINAL_COMMAND_LINE
118 FILESETS: $DATABASE_FILES
121 cat >$TARBALL_LOCATION/$DIRNAME/build.status <<FIN
125 OVERALL STATUS: <not yet tested>
126 OVERALL PERFORMANCE: <not yet tested>
127 MAJOR PROBLEMS: <not yet tested>
131 chmod g+w $TARBALL_LOCATION/$DIRNAME/build.status
139 if [ "$BUILD_TREE" = "" ]; then
140 ScriptName=$3 # use short config file name (foo.cfg)
142 ScriptName=$2 # use long config file name (configFoo)
145 if [ $CDECONFIGDIR = "CONFIG" ]; then
146 typeset -u ScriptName
149 test_string=${DATABASE_FILES#*$FilesetName}
150 if (( ${#DATABASE_FILES} > ${#test_string} ))
152 if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
154 Log "Executing $PLATFORM specific $FilesetName customize script"
155 KORNSHELL $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -e 2>&1 | \
157 elif [ -x $POST_INSTALL_DIR/$ScriptName ]
159 Log "Executing $FilesetName customize script"
160 KORNSHELL $POST_INSTALL_DIR/$ScriptName -e 2>&1 | tee -a $LOGFILE
169 DoFilesetScript CDE-TT configTT tt.cfg
170 DoFilesetScript CDE-MIN configMin min.cfg
171 DoFilesetScript CDE-SHLIBS configShlibs shlibs.cfg
172 DoFilesetScript CDE-RUN configRun run.cfg
178 Log "Creating packing list."
179 touch $INSTALL_LOCATION/Packing_list
180 for i in `echo $DATABASE_FILES`
183 KORNSHELL $TOOL_DIR/udbToAny.ksh -toDB -ReleaseStream $PLATFORM $DATABASE_DIR/${i}.udb > /tmp/${i}.db
184 if [ -r /tmp/${i}.db ]
186 for file in `fgrep install_target /tmp/${i}.db | cut -sf 2 -d \: `
188 echo "$file" >>$INSTALL_LOCATION/Packing_list
196 HASH kill these processes so that they can be removed and new ones
199 for i in inetd rpc.ttdbserver rpc.cmsd
201 if [ "$PLATFORM" = "aix" -a $i = "inetd" ]
203 lssrc -s inetd >/dev/null 2>&1
206 stopsrc -s inetd >>$LOGFILE 2>&1
208 elif [ "$PLATFORM" = "openbsd" ]
210 ps axo pid,comm | grep $i > /tmp/tmppsout
211 if [ -s /tmp/tmppsout ]
213 awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
216 elif [ "$PLATFORM" = "freebsd" ]
218 ps axo pid,comm | grep $i > /tmp/tmppsout
219 if [ -s /tmp/tmppsout ]
221 awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
224 elif [ "$PLATFORM" = "netbsd" ]
226 ps axo pid,comm | grep $i > /tmp/tmppsout
227 if [ -s /tmp/tmppsout ]
229 awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
232 elif [ "$PLATFORM" = "linux" ]
234 ps axo pid,comm | grep $i > /tmp/tmppsout
235 if [ -s /tmp/tmppsout ]
237 awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f
241 ps -ef | grep $i | grep -v grep >/tmp/tmppsout
242 if [ -s /tmp/tmppsout ]
244 awk '{print "kill " $2}' /tmp/tmppsout | /bin/csh -f
254 HASH now restart inetd
258 if [ "$PLATFORM" = "sun" ]
260 /usr/sbin/svcadm refresh svc:/network/inetd:default
261 /usr/sbin/svcadm restart svc:/network/inetd:default
262 elif [ "$PLATFORM" = "aix" ]
264 startsrc -s inetd >>$LOGFILE 2>&1
265 elif [ "$PLATFORM" = "dec" ]
268 elif [ "$PLATFORM" = "openbsd" ]
270 /etc/rc.d/inetd start >/dev/null
271 elif [ "$PLATFORM" = "freebsd" ]
273 /etc/rc.d/inetd onestart
274 elif [ "$PLATFORM" = "netbsd" ]
276 /etc/rc.d/inetd start >/dev/null
277 elif [ "$PLATFORM" = "linux" ]
279 /etc/init.d/openbsd-inetd start >/dev/null 2>&1
290 CheckForActualLocations()
293 XCOMM if different actual locations specified, set up the links
297 if [ "$CLEAN_DAEMONS" = "yes" ]
302 HASH remove the contents of the installation directory then the directory
305 if [ "$CLEANING" = "yes" ]
307 Log "Removing $INSTALL_LOCATION contents... "
308 if [ -d $INSTALL_LOCATION ]
310 rm -rf $INSTALL_LOCATION/STAR
311 if [ "$LeaveLinks" = "yes" ]
313 if [ ! -L $INSTALL_LOCATION ]
315 rm -rf $INSTALL_LOCATION
318 if [ -L $INSTALL_LOCATION ]
320 rm -f $INSTALL_LOCATION
322 rm -rf $INSTALL_LOCATION
328 if [ "$CONFIGURE_ONLY" = "no" ]
330 if [ "$ACTUAL_INSTALLATION_LOC" != "" ]
334 HASH first create the actual directory - if not there
337 if [ ! -d $ACTUAL_INSTALLATION_LOC ]
339 mkdir -p $ACTUAL_INSTALLATION_LOC
340 if [ ! -d $ACTUAL_INSTALLATION_LOC ]
342 Log "cannot create $ACTUAL_INSTALLATION_LOC directory"
347 ln -s $ACTUAL_INSTALLATION_LOC $INSTALL_LOCATION
350 if [ ! -d $INSTALL_LOCATION -a ! -L $INSTALL_LOCATION ];
352 mkdir -p $INSTALL_LOCATION
357 if [ "$CLEAN_DAEMONS" = "yes" ]
362 HASH remove the contents of the configuration directory
364 if [ "$CLEANING_ETC" = "yes" ]
366 Log "Removing $CONFIGURE_LOCATION contents... "
367 if [ -d $CONFIGURE_LOCATION ]
369 rm -rf $CONFIGURE_LOCATION/STAR
370 if [ "$LeaveLinks" = "yes" ]
372 if [ ! -L $CONFIGURE_LOCATION ]
374 rm -rf $CONFIGURE_LOCATION
377 if [ -L $CONFIGURE_LOCATION ]
379 rm -f $CONFIGURE_LOCATION
381 rm -rf $CONFIGURE_LOCATION
387 if [ "$ACTUAL_CONFIGURATION_LOC" != "" ]
389 if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
391 mkdir -p $ACTUAL_CONFIGURATION_LOC
392 if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
394 Log "cannot create $ACTUAL_CONFIGURATION_LOC directory"
399 ln -s $ACTUAL_CONFIGURATION_LOC $CONFIGURE_LOCATION
402 if [ ! -d $CONFIGURE_LOCATION -a ! -L $CONFIGURE_LOCATION ];
404 mkdir -p $CONFIGURE_LOCATION
408 if [ "$CLEANING" = "yes" ]
410 Log "Removing $LOGFILES_LOCATION contents... "
411 if [ -d $LOGFILES_LOCATION ]
413 rm -rf $LOGFILES_LOCATION/STAR
414 if [ "$LeaveLinks" = "yes" ]
416 if [ ! -L $LOGFILES_LOCATION ]
418 rm -rf $LOGFILES_LOCATION
421 if [ -L $LOGFILES_LOCATION ]
423 rm -f $LOGFILES_LOCATION
425 rm -rf $LOGFILES_LOCATION
431 if [ "$ACTUAL_VAR_LOC" != "" ]
433 if [ ! -d $ACTUAL_VAR_LOC ]
435 mkdir -p $ACTUAL_VAR_LOC
436 if [ ! -d $ACTUAL_VAR_LOC ]
438 Log "cannot create $ACTUAL_VAR_LOC directory"
443 ln -s $ACTUAL_VAR_LOC $LOGFILES_LOCATION
446 if [ ! -d $LOGFILES_LOCATION -a ! -L $LOGFILES_LOCATION ];
448 mkdir -p $LOGFILES_LOCATION
457 echo -e "Usage: $(basename $0) {-s <source>|-z <package>} [options]"
459 echo -e "\t-s <source>\t\t\tthe top of the build tree"
460 echo -e "\t-z <package>\t\tthe desktop install package"
464 echo -e "\t[-t <package_destination>]\tif specified create an"
465 echo -e "\t\t\t\t\tinstall package and store it in the"
466 echo -e "\t\t\t\t\tdestination."
467 echo -e "\t[-pI <actual install location>]\twhere" CDE_INSTALLATION_TOP "will be linked to."
468 echo -e "\t[-pC <actual config location>]\twhere" CDE_CONFIGURATION_TOP "will be linked to."
469 echo -e "\t[-pV <actual var location>]\twhere" CDE_LOGFILES_TOP "will be linked to."
471 echo -e "\t[-a <udb directory>]\t\talternate place to get the"
472 echo -e "\t\t\t\t\tudb files from."
473 echo -e "\t[-f <filesets>]\t\t\tspecify filesets to be loaded."
474 echo -e "\t\t\t\t\tThe list should be double-quoted,"
475 echo -e "\t\t\t\t\tspace-separated, with no .udb"
476 echo -e "\t\t\t\t\textensions."
478 echo -e "\t[-clean]\t\t\tremove the temporary, configuration, and"
479 echo -e "\t\t\t\t\tinstallation directory"
480 echo -e "\t[-cleanTwo]\t\t\tremove the temporary and installation "
481 echo -e "\t\t\t\t\tdirectory, but NOT the configuration directory"
482 echo -e "\t[-cleanEtc]\t\t\tremove the configuration directory, but "
483 echo -e "\t\t\t\t\NOT the temporary and installation directories"
484 echo -e "\t[-prog]\t\t\t\tload only the development environment"
485 echo -e "\t[-runtime]\t\t\tload only the runtime environment"
486 echo -e "\t[-relative]\t\t\trun the relative-located config scripts"
487 echo -e "\t[-pack]\t\t\t\tcreate a packing list"
488 echo -e "\t[-pseudo]\t\t\tdo not configure desktop when installing"
489 echo -e "\t[-nocompress]\t\t\tdo not compress tarball when creating package"
490 echo -e "\t[-lang LANG]\t\t\tspecify LANG to load only appropriate localized"
491 echo -e "\t\t\t\t\tfilesets for LANG"
492 echo -e "\t[-LeaveLinks]\t\t\t\tdo not delete the links after cleaning"
494 echo -e "\t[-LinkStepOnly]\t\t\tset up the -pI, -pC, and -pV links"
495 echo -e "\t\t\t\t\tthen exit"
496 echo -e "\t[-DontRunScripts]\t\tstop after installation"
497 echo -e "\t[-RunScriptsOnly]\t\tonly execute the scripts"
498 echo -e "\t[-configureOnly]\t\tonly configure the desktop"
499 echo -e "\t[-destdir dir]\t\tInstall all files under dir/"
501 echo -e "\tExamples:"
503 echo -e "\tinstallCDE -s /x/cde_hp700_90"
504 echo -e "\tinstallCDE -s /x/cde_aix_32 -f \"CDE_MIN CDE-SHLIBS\""
505 echo -e "\tinstallCDE -s /x/cde_sun_52 -pI /bigdisk/opt/dt -clean"
506 echo -e "\tinstallCDE -s /x/cde_sun_52 -pI /dtinstall -clean\\"
507 echo -e "\t\t-pseudo -t /dtpackages -nocompress"
511 XCOMM LoadFileSet() - load a UDB file
512 XCOMM $1 - fileset number
513 XCOMM $2 - fileset name
517 if [ "$1" = "" ]; then
523 XCOMM don't bother if the fileset doesn't exist
524 if [ ! -e $DATABASE_DIR/${2}.udb ]
529 Log " $num installing database $2"
530 Log " - creating ${2}.lst file"
531 KORNSHELL $TOOL_DIR/udbToAny.ksh -toLst -ReleaseStream $PLATFORM \
532 $DATABASE_DIR/${2}.udb > /tmp/${2}.lst
533 Log " - installing ... "
534 KORNSHELL $TOOL_DIR/mkProd -D $DESTINATION_DIR -S $BUILD_TREE /tmp/${2}.lst \
535 2>/tmp/${2}.err 1>/tmp/${2}.good
538 Log " - checking for errors ..."
539 rm -f /tmp/${2}.missing
540 awk '{if ($1 == "ERROR:") print " " $4}' \
541 /tmp/${2}.err >> /tmp/${2}.missing
542 if [ -s /tmp/${2}.missing ]
544 Log " - missing files:"
545 cat /tmp/${2}.missing | tee -a $LOGFILE
548 ORIGINAL_COMMAND_LINE="$*"
550 XCOMM Set which system we are on
554 PLATFORM_SCRIPT_DIR=""
559 if [ $BUILDSYSTEM = "AIX" ];
562 PLATFORM_SCRIPT_DIR=ibm
563 elif [ $BUILDSYSTEM = "SunOS" ];
566 PLATFORM_SCRIPT_DIR=sun
567 elif [ $BUILDSYSTEM = "Linux" ];
570 PLATFORM_SCRIPT_DIR="linux"
571 elif [ $BUILDSYSTEM = "FreeBSD" ];
574 PLATFORM_SCRIPT_DIR="freebsd"
575 elif [ $BUILDSYSTEM = "OpenBSD" ];
578 PLATFORM_SCRIPT_DIR="openbsd"
579 elif [ $BUILDSYSTEM = "NetBSD" ];
582 PLATFORM_SCRIPT_DIR="netbsd"
583 else # Build system = HP
585 PLATFORM_SCRIPT_DIR=hp
588 if [ "$PLATFORM" = "aix" ];
592 USER=`/usr/bin/whoami`
595 if [ "$USER" != "root" ];
598 echo "You should be root to run this script. Continuing anyway."
607 COMPRESS_TARBALL="yes"
608 USE_ALTERNATE_UDB_DIR="no"
613 ACTUAL_INSTALLATION_LOC=""
614 ACTUAL_CONFIGURATION_LOC=""
616 CREATE_PACKING_LIST="no"
617 DO_LINK_STEP_ONLY="no"
620 RUN_SCRIPTS_ONLY="no"
630 BUILT_LOCALES=builtLocales
631 Log "Built locales: $BUILT_LOCALES"
635 Log "Options specified..."
636 while [ $# -ne 0 ]; do
638 -s) Log " - get the build tree to extract from"
647 -z) Log " - get the install package to extract from"
656 -t) Log " - where to put the install package"
662 if [ "$SOURCE_TAR_FILE" = "" ]
669 -a) Log " - alternate place to get the udb files from"
676 USE_ALTERNATE_UDB_DIR="yes"
679 -f) Log " - load specific filesets"
688 -p) Log " - get all locations"
694 ACTUAL_INSTALLATION_LOC=$1
695 ACTUAL_CONFIGURATION_LOC=$1
699 -pI) Log " - get actual installation location"
705 ACTUAL_INSTALLATION_LOC=$1
708 -pC) Log " - get actual configuration location"
714 ACTUAL_CONFIGURATION_LOC=$1
717 -pV) Log " - get actual var location"
726 -clean) Log " - delete all three cde directories"
731 -cleanTwo) Log " - delete only temporary and installation directories"
735 -cleanEtc) Log " - delete only the configuration directory"
739 -prog) Log " - load only the development environment"
744 -runtime) Log " - load only the runtime environment"
749 -relative) Log " - run the relative-located config scripts"
753 -pack) Log " - create a packing list"
754 CREATE_PACKING_LIST="yes"
757 -LeaveLinks) Log " - do not remove the links"
761 -LinkStepOnly) Log " - do link step only"
762 DO_LINK_STEP_ONLY="yes"
765 -DontRunScripts) Log " - stop after installation"
766 DO_INSTALL_ONLY="yes"
769 -RunScriptsOnly) Log " - only run scripts"
770 RUN_SCRIPTS_ONLY="yes"
773 -pseudo) Log " - pseudo install"
779 -nocompress) Log " - do not compress tarball"
780 COMPRESS_TARBALL="no"
783 -lang) Log " - load localized filesets"
792 -configureOnly) Log " - Configure only"
797 -destdir) Log " - Destination Directory"
806 *) Log " - unknown option"
815 if [ -z "$BUILD_TREE" -a -z "$TAR_TREE" ]
821 if [ "$BUILD_TREE" != "" -a ! -d "$BUILD_TREE" ]
823 Log "Build tree does not exist."
827 if [ "$TAR_TREE" != "" -a ! -d "$TAR_TREE" ]
829 Log "Tar tree does not exist."
833 if [ "$DESTINATION_DIR" != "" -a ! -d "$DESTINATION_DIR" ]
835 Log "Creating $DESTINATION_DIR"
836 mkdir $DESTINATION_DIR
840 Log "mkdir $DESTINATION_DIR failed"
851 XCOMM get the current time stamp if going to create a tarball
854 if [ $TARBALL = "yes" ];
860 if [ -z "$BUILD_TREE" -a ${0##STAR/} = INSTALL.CDE ]; then
861 typeset -u CDEPACKAGE
862 typeset -u CDETARFILE
863 typeset -u CDETARFILEZ
864 typeset -u CDECONFIGDIR
867 TOOL_DIR=$BUILD_TREE/admin/IntegTools/dbTools
868 if [ "$USE_RELATIVE" = "yes" ]
870 POST_INSTALL_DIR=../post_install
872 if [ -z "$BUILD_TREE" ]
874 POST_INSTALL_DIR=$TAR_TREE/$CDECONFIGDIR
876 POST_INSTALL_DIR=$BUILD_TREE/admin/IntegTools/post_install
880 if [ "$USE_ALTERNATE_UDB_DIR" = "yes" ]
882 DATABASE_DIR=$ALTERNATE_UDB_DIR/databases
884 DATABASE_DIR=$BUILD_TREE/databases
887 if [ "$DATABASE_FILES" = "" ]
889 if [ "$DEVELOP_ENV" = "yes" ]
891 DATABASE_FILES="CDE-HELP-PRG CDE-PRG CDE-INC CDE-DEMOS \
892 CDE-MAN-DEV CDE-SHLIBS"
893 elif [ "$RUNTIME_ENV" = "yes" ]
895 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
896 CDE-HELP-C CDE-MSG-C CDE-SHLIBS CDE-ICONS CDE-FONTS \
897 CDE-INFO CDE-INFOLIB-C"
899 DATABASE_FILES="CDE-RUN CDE-MIN CDE-TT CDE-MAN CDE-HELP-RUN CDE-C \
900 CDE-MSG-C CDE-HELP-C CDE-SHLIBS CDE-HELP-PRG \
901 CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \
902 CDE-FONTS CDE-INFO CDE-INFOLIB-C"
904 HASH now load any localized filesets
905 if [ "$DEVELOP_ENV" != "yes" ]
908 if [ "$theLang" != "" ]
910 DATABASE_FILES="$DATABASE_FILES CDE-$theLang CDE-MSG-$theLang \
913 HASH load all current (working) languages in $BUILT_LOCALES
916 if [ "${BUILT_LOCALES#*_DE}" != "$BUILT_LOCALES" ]
918 DATABASE_FILES="$DATABASE_FILES CDE-DE CDE-MSG-DE \
923 if [ "${BUILT_LOCALES#*_FR}" != "$BUILT_LOCALES" ]
925 DATABASE_FILES="$DATABASE_FILES CDE-FR CDE-MSG-FR \
930 if [ "${BUILT_LOCALES#*_IT}" != "$BUILT_LOCALES" ]
932 DATABASE_FILES="$DATABASE_FILES CDE-IT CDE-MSG-IT \
937 if [ "${BUILT_LOCALES#*_ES}" != "$BUILT_LOCALES" ]
939 DATABASE_FILES="$DATABASE_FILES CDE-ES CDE-MSG-ES \
948 [ -z "$INSTALL_LOCATION" ] && INSTALL_LOCATION=CDE_INSTALLATION_TOP
949 [ -z "$CONFIGURE_LOCATION" ] && CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
950 [ -z "$LOGFILES_LOCATION" ] && LOGFILES_LOCATION=CDE_LOGFILES_TOP
952 if [ -L $INSTALL_LOCATION -a "$CONFIGURE_ONLY" != "yes" ]
954 touch $INSTALL_LOCATION/foo >/dev/null 2>/dev/null
955 if [ ! -f $INSTALL_LOCATION/foo ]
957 Log "Insufficient permissions to install CDE files in $INSTALL_LOCATION"
960 if [ ! -O $INSTALL_LOCATION/foo ]
962 Log "Root access to $INSTALL_LOCATION is required for CDE installation."
965 rm $INSTALL_LOCATION/foo
968 if [ -d $INSTALL_LOCATION ]
970 if [ -x $INSTALL_LOCATION/bin -a ! -d $INSTALL_LOCATION/bin ]
972 rm -f $INSTALL_LOCATION/bin
976 if [ "$CONFIGURE_ONLY" = "yes" ]
978 CheckForActualLocations
980 Log "Configuration completed."
984 if [ "$RUN_SCRIPTS_ONLY" = "yes" ]
990 CheckForActualLocations
992 if [ "$DO_LINK_STEP_ONLY" = "yes" ]
997 if [ "$CREATE_PACKING_LIST" = "yes" ]
1004 XCOMM we are ready to load the environment ...
1007 if [ "$BUILD_TREE" != "" ]
1009 Log "Load the Desktop from $BUILD_TREE"
1013 for i in `echo $DATABASE_FILES`
1015 LoadFileSet "$j" "$i"
1019 Log "Load the Desktop from $TAR_TREE"
1020 compressed=$(awk '/COMPRESSED: /{print $2}' $TAR_TREE/$CDEPACKAGE)
1021 if [ "$compressed" = "yes" ]; then
1022 uncompress <$TAR_TREE/$CDETARFILEZ | tar xvf - $INSTALL_LOCATION
1024 tar -xvf $TAR_TREE/$CDETARFILE $INSTALL_LOCATION
1026 DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' $TAR_TREE/$CDEPACKAGE)
1030 Log "Desktop installed in ${DESTINATION_DIR}${INSTALL_LOCATION}"
1032 if [ "$DO_INSTALL_ONLY" = "yes" ]
1037 if [ $TARBALL = "yes" ];
1044 if [ "$RUN_SCRIPTS" = "yes" ]
1049 if [ "$REMOVE_LINKS" = "yes" ]
1051 [ -L /usr/dt ] && rm /usr/dt
1052 [ -L /etc/dt ] && rm /etc/dt
1053 [ -L /var/dt ] && rm /var/dt
1058 echo "See $LOGFILE for a log of this install session."