1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

post_install: fix shellcheck warnings

This commit is contained in:
chase 2018-08-18 13:33:35 -05:00 committed by Jon Trulson
parent ba28368c40
commit e8e0364121
19 changed files with 186 additions and 253 deletions

View file

@ -1,4 +1,4 @@
#!/bin/ksh
awk '{if ($1 == "install_target" && $3 != "") print $3}' \
$2/databases/$1.udb >$1.list
"$2/databases/$1.udb" >"$1.list"

View file

@ -19,19 +19,19 @@ XCOMM #
XCOMM ############################################
RemoveDemoFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -65,13 +65,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveFontFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,14 +61,11 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-FONTS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -13,19 +13,19 @@ XCOMM #######
RemoveHelpFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -43,7 +43,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -59,17 +59,14 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -13,19 +13,19 @@ XCOMM #######
RemoveHelpFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -43,7 +43,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF1
@ -59,13 +59,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveHelpRunFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-RUN
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveIconFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-ICONS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveIncludeFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-INC
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveManFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,30 +15,30 @@ XCOMM ############################################
RemoveManDevFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
if [ -L $SRC -a -d $SRC ]
if [ -L "$SRC" ] && [ -d "$SRC" ]
then
results=`ls $SRC`
results=$(find -name "$SRC")
if [ ! -s "$SRC" ]
then
rm -f $SRC
rm -f "$SRC"
else
continue
fi
else
rm -f $SRC
rm -f "$SRC"
fi
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -56,7 +56,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -72,13 +72,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MAN-DEV
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveMsgCatFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MSG-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemovePrgFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -61,13 +61,10 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-PRG
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -14,19 +14,19 @@ XCOMM #######
XCOMM ############################################
RemoveShlibFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -44,7 +44,7 @@ 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 SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -60,13 +60,10 @@ XCOMM Main Body
XCOMM
XCOMM #########################################################################
PRODUCT=CDE
FILESET=CDE-SHLIBS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -7,9 +7,6 @@ XCOMM @(#) $TOG: configMin.src /main/1 1998/03/11 16:18:12 mgreess $
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
FixEtcServices()
@ -72,19 +69,19 @@ TMPFILE=/tmp/services
RemoveMinFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -102,7 +99,7 @@ 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 SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -118,7 +115,7 @@ XCOMM Main Body
XCOMM
XCOMM ###############################################################
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "configure" ]
then

View file

@ -9,9 +9,6 @@ XCOMM #######
#define HASH #
#define STAR *
PRODUCT=CDE
FILESET=CDE-RUN
DO_CONFIGURATION=""
retval=0
CreateAppConfigDirectory()
@ -21,41 +18,42 @@ CreateAppConfigDirectory()
HASH all of its subdirectories
HASH
cd $DT_CONFIG_TOP
if [ ! -d $APPCONFIG ]
cd "$DT_CONFIG_TOP" || exit
if [ ! -d "$APPCONFIG" ]
then
mkdir $APPCONFIG
mkdir "$APPCONFIG"
fi
cd $APPCONFIG
cd "$APPCONFIG" || exit
for i in $APPCONFIG_DIRS
do
if [ ! -d $i ]
(
if [ ! -d "$i" ]
then
mkdir $i
mkdir "$i"
fi
cd $i
cd "$i" || exit
HASH
HASH for each locale
HASH
for j in $DT_TOP/$APPCONFIG/$i/STAR
do
if [ ! -d `basename $j` ]
if [ ! -d "$(basename "$j")" ]
then
mkdir `basename $j`
mkdir "$(basename "$j")"
fi
done
cd ..
)
done
}
doDttermTerminfo()
{
if [ -f $DT_TOP/config/dtterm.ti ]
if [ -f "$DT_TOP/config/dtterm.ti" ]
then
tic $DT_TOP/config/dtterm.ti
tic "$DT_TOP/config/dtterm.ti"
if [ -f /usr/share/lib/terminfo/d/dtterm ]
then
chown bin /usr/share/lib/terminfo/d/dtterm
@ -69,7 +67,7 @@ doDttermTerminfo()
chmod 644 /usr/share/terminfo/d/dtterm
fi
fi
if [ ! -f /usr/share/lib/terminfo/d/dtterm -a ! -f /usr/share/terminfo/d/dtterm ]
if [ ! -f /usr/share/lib/terminfo/d/dtterm ] && [ ! -f /usr/share/terminfo/d/dtterm ]
then
echo "Unable to compile $DT_TOP/config/dtterm.ti"
fi
@ -80,19 +78,19 @@ doDttermTerminfo()
RemoveRunFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -122,7 +120,7 @@ XCOMM exists the link is correct /usr/dt/link
PrintUsage()
{
echo "Usage:" $0 "[OPERATION]"
echo "Usage:" "$0" "[OPERATION]"
echo ""
echo "Operations:"
echo " -e configure"
@ -140,22 +138,16 @@ 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="DtPrint"
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "usage" ]
then
@ -175,12 +167,12 @@ DEFAULT_PRINTER="DtPrint"
mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
fi
cd $DT_TEMP_TOP
cd "$DT_TEMP_TOP" || exit
mv $APPCONFIG/appmanager .hidden-appmanager
chmod -R 755 *
chmod -R 755 -- *
chmod 755 .hidden-appmanager
chown -R bin *
chgrp -R bin *
chown -R bin -- *
chgrp -R bin -- *
mv .hidden-appmanager $APPCONFIG/appmanager
chmod 755 .
chown bin .
@ -209,14 +201,14 @@ DEFAULT_PRINTER="DtPrint"
HASH Configure Xsession.d
HASH
cd $DT_CONFIG_TOP/config
cd $DT_CONFIG_TOP/config || exit
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
cd $DT_CONFIG_TOP
chmod -R 755 *
cd $DT_CONFIG_TOP || exit
chmod -R 755 -- *
doDttermTerminfo

View file

@ -6,19 +6,19 @@ XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $
XCOMM ############################################
RemoveShlibFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -36,7 +36,7 @@ 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 SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -54,14 +54,14 @@ XCOMM
XCOMM creates links in the install tree libtt.so -> libtt.so.1
XCOMM
cd CDE_INSTALLATION_TOP/lib
cd CDE_INSTALLATION_TOP/lib || exit
for lib in `/bin/ls *.so.*`
for lib in $(/bin/ls) ./*.so.*
do
link=`echo $lib | cut -d. -f1,2`
link=$(echo "$lib" | cut -d. -f1,2)
rm -f $link
ln -s $lib $link
rm -f "$link"
ln -s "$lib" "$link"
done
@ -73,13 +73,10 @@ XCOMM Main Body
XCOMM
XCOMM #########################################################################
PRODUCT=CDE
FILESET=CDE-SHLIBS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -11,26 +11,23 @@ XCOMM
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-TT
DO_CONFIGURATION=""
retval=0
RemoveTTFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -48,7 +45,7 @@ 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 SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -64,7 +61,7 @@ XCOMM Main Body
XCOMM
XCOMM ######################################################################
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "configure" ]
then

View file

@ -1,14 +0,0 @@
if [ "$SRC" != "" ]
then
set -A tokens $SRC
if [ "${tokens[3]}" = "file" ]
then
if [ -f ${tokens[0]} ]
then
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
echo "$filesize\t\t\c"
echo "${tokens[0]}"
let total=total+filesize
fi
fi
fi

View file

@ -1,9 +1,9 @@
if [ "$SRC" != "" ]
then
set -A tokens $SRC
set -A tokens "$SRC"
if [ "${tokens[3]}" = "file" ]
then
if [ -f ${tokens[0]} ]
if [ -f "${tokens[0]}" ]
then
printf "exists "
else
@ -13,7 +13,7 @@
fi
elif [ "${tokens[3]}" = "sym_link" ]
then
if [ -L ${tokens[0]} ]
if [ -L "${tokens[0]}" ]
then
printf "exists "
else
@ -26,9 +26,9 @@
if [ "${tokens[3]}" = "file" ]
then
touch /tmp/config-test
chmod ${tokens[1]} /tmp/config-test
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
chmod "${tokens[1]}" /tmp/config-test
tmpperms=$(ls -l /tmp/config-test | awk '{print $1}')
realperms=$(ls -l "${tokens[0]}" | awk '{print $1}')
if [ "$tmpperms" = "$realperms" ]
then
@ -37,7 +37,7 @@
printf " WRONG "
fi
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
owner=$(ls -l "${tokens[0]}" | awk '{print $3}')
if [ "$owner" = "${tokens[4]}" ]
then
@ -46,7 +46,7 @@
printf " WRONG "
fi
group=`ls -l ${tokens[0]} | awk '{print $4}'`
group=$(ls -l "${tokens[0]}" | awk '{print $4}')
if [ "$group" = "${tokens[5]}" ]
then
@ -56,7 +56,7 @@
fi
elif [ "${tokens[3]}" = "sym_link" ]
then
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
linkto=$(ls -l "${tokens[0]}" | awk '{print $11}')
if [ "${tokens[2]}" = "$linkto" ]
then
printf " the link is correct "