194 lines
3.8 KiB
Plaintext
Executable File
194 lines
3.8 KiB
Plaintext
Executable File
XCOMM! /bin/ksh
|
|
XCOMM #######
|
|
XCOMM Product: CDE
|
|
XCOMM Fileset: CDE-RUN
|
|
XCOMM customize
|
|
XCOMM @(#) $XConsortium: configRun.src /main/6 1996/10/18 16:30:22 drk $
|
|
XCOMM #######
|
|
XCOMM
|
|
XCOMM (c) Copyright Hewlett-Packard Company, 1993
|
|
XCOMM
|
|
XCOMM #######
|
|
|
|
#define HASH #
|
|
#define STAR *
|
|
|
|
CreateAppConfigDirectory()
|
|
{
|
|
HASH
|
|
HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
|
|
HASH all of its subdirectories
|
|
HASH
|
|
|
|
cd $DT_CONFIG_TOP
|
|
if [ ! -d $APPCONFIG ]
|
|
then
|
|
mkdir $APPCONFIG
|
|
fi
|
|
|
|
cd $APPCONFIG
|
|
|
|
for i in $APPCONFIG_DIRS
|
|
do
|
|
if [ ! -d $i ]
|
|
then
|
|
mkdir $i
|
|
fi
|
|
cd $i
|
|
XCOMM
|
|
HASH for each locale
|
|
HASH
|
|
for j in $DT_TOP/$APPCONFIG/$i/STAR
|
|
do
|
|
if [ ! -d `basename $j` ]
|
|
then
|
|
mkdir `basename $j`
|
|
fi
|
|
done
|
|
cd ..
|
|
done
|
|
|
|
}
|
|
|
|
LinkOtherIcons()
|
|
{
|
|
while read SRC
|
|
do
|
|
rm -f $DT_TOP/$APPCONFIG/icons/C/F$SRC
|
|
ln -s $DT_TOP/$APPCONFIG/icons/C/$SRC $DT_TOP/$APPCONFIG/icons/C/F$SRC
|
|
done <<-EOF
|
|
fphelp.t.pm
|
|
help.t.pm
|
|
paint.l.pm
|
|
paint.m.pm
|
|
paint.t.pm
|
|
penpad.t.pm
|
|
term.t.pm
|
|
EOF
|
|
}
|
|
|
|
XCOMM ##########################################################################
|
|
XCOMM
|
|
XCOMM Main Body
|
|
XCOMM
|
|
XCOMM ##########################################################################
|
|
|
|
PRODUCT=CDE
|
|
FILESET=CDE-RUN
|
|
|
|
DT_TOP=CDE_INSTALLATION_TOP
|
|
DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
|
|
DT_TEMP_TOP=CDE_LOGFILES_TOP
|
|
ROOT=/
|
|
|
|
retval=0
|
|
|
|
APPCONFIG=appconfig
|
|
APPCONFIG_DIRS="appmanager help icons types"
|
|
PRINTERS=""
|
|
DEFAULT_PRINTER="Default_Print"
|
|
|
|
HASH
|
|
HASH create the CDE_LOGFILES_TOP directory
|
|
HASH
|
|
if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ]
|
|
then
|
|
mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
|
|
fi
|
|
mv $APPCONFIG/appmanager .hidden-appmanager
|
|
chmod -R 755 $DT_TEMP_TOP/STAR
|
|
chmod 755 $DT_TEMP_TMP/.hidden-appmanager
|
|
chown -R bin $DT_TEMP_TOP/STAR
|
|
chgrp -R bin $DT_TEMP_TOP/STAR
|
|
mv $DT_TEMP_TMP/.hidden-appmanager $DT_TEMP_TMP/$APPCONFIG/appmanager
|
|
chmod 755 $DT_TEMP_TOP
|
|
chown bin $DT_TEMP_TOP
|
|
chgrp bin $DT_TEMP_TOP
|
|
|
|
HASH
|
|
HASH create the CDE_CONFIGURATION_TOP and its config directory
|
|
HASH
|
|
if [ ! -d $DT_CONFIG_TOP ]
|
|
then
|
|
mkdir -p $DT_CONFIG_TOP
|
|
fi
|
|
if [ ! -d $DT_CONFIG_TOP/config ]
|
|
then
|
|
mkdir -p $DT_CONFIG_TOP/config
|
|
fi
|
|
|
|
CreateAppConfigDirectory
|
|
|
|
cd $DT_TOP/$APPCONFIG/appmanager
|
|
HASH
|
|
HASH for each locale
|
|
HASH
|
|
for i in *
|
|
do
|
|
if [ -d $i ]
|
|
then
|
|
cd $i
|
|
HASH
|
|
HASH for each directory in the locale, check for a
|
|
HASH localized version of the Printers directory
|
|
HASH and for the file lp_Print within that directory
|
|
HASH
|
|
for j in *
|
|
do
|
|
if [ -f $j/$DEFAULT_PRINTER ]
|
|
then
|
|
|
|
PRINTERS=$j
|
|
|
|
HASH make the equivalent directory in the configuration
|
|
HASH directory
|
|
|
|
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i ]
|
|
then
|
|
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
|
|
fi
|
|
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i
|
|
if [ ! -d $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS ]
|
|
then
|
|
mkdir $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
|
|
fi
|
|
cd $DT_CONFIG_TOP/$APPCONFIG/appmanager/$i/$PRINTERS
|
|
|
|
HASH now copy the file over from the installation dirctory
|
|
HASH if it is not already present.
|
|
|
|
if [ ! -f $DEFAULT_PRINTER ]
|
|
then
|
|
cp $DT_TOP/$APPCONFIG/appmanager/$i/$PRINTERS/$DEFAULT_PRINTER .
|
|
fi
|
|
cd $DT_TOP/$APPCONFIG/appmanager/$i
|
|
fi
|
|
done
|
|
cd $DT_TOP/$APPCONFIG/appmanager
|
|
fi
|
|
done
|
|
|
|
HASH
|
|
HASH Configure Xsession.d
|
|
HASH
|
|
|
|
cd $DT_CONFIG_TOP/config
|
|
if [ ! -d Xsession.d ]
|
|
then
|
|
mkdir Xsession.d
|
|
fi
|
|
|
|
chmod -R 755 $DT_CONFIG_TOP
|
|
|
|
LinkOtherIcons
|
|
|
|
HASH
|
|
HASH mkProd can't seem to handle a mode of 2555 so
|
|
HASH do it here
|
|
HASH
|
|
|
|
chmod 2555 $DT_TOP/bin/dtmail
|
|
|
|
return $retval
|
|
|