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

@@ -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
@@ -52,11 +52,11 @@ 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 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
@@ -68,17 +68,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
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