cdesktopenv/cde/admin/IntegTools/post_install/configManDev.src

98 lines
1.8 KiB
Plaintext
Executable File

XCOMM! /bin/ksh
XCOMM #######
XCOMM Product: CDE
XCOMM Fileset: CDE-MAN-DEV
XCOMM customize
XCOMM @(#) $XConsortium: configManDev.src /main/4 1996/04/23 19:33:22 drk $
XCOMM #######
XCOMM
XCOMM (c) Copyright Hewlett-Packard Company, 1993
XCOMM
XCOMM #######
#define STAR *
XCOMM ############################################
RemoveManDevFiles()
{
while read -r SRC
do
if [ "$SRC" != "" ]
then
if [ -L "$SRC" ] && [ -d "$SRC" ]
then
results=$(find -name "$SRC")
if [ ! -s "$SRC" ]
then
rm -f "$SRC"
else
continue
fi
else
rm -f "$SRC"
fi
dirname=${SRC%/STAR}
if [ -d "$dirname" ]
then
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
fi
done <<-EOF
#include "CDE-MAN-DEV.list"
EOF
}
VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read -r SRC
do
#include "verify.func"
done <<-EOF
#include "CDE-MAN-DEV.lst"
EOF
}
#include "option.func"
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then
echo "de-Configuring for CDE-MAN-DEV..."
RemoveManDevFiles
VerifyInstalledFiles
elif [ "$OPERATION" = "verify" ]
then
VerifyInstalledFiles
fi
return $retval