The shell script is not returning proper result

Can anybody pls look into this script and tell me where I went wrong. After running this script, it is showing like "Trying to overlay current working directory ABORT!!!"
:frowning:

ARGCNT=$#
if [ "${ARGCNT}" -ne 2 ]
then
echo "Two parameters are needed for this shell "
echo "Please try again with the following parms: "
echo "first parm = release "
echo "second parm = fully qualified tar file name "
echo " "
exit 1
else
RELEASE=$1
TARFILE=$2
fi

###############################################################
### verify release exists
###############################################################
if [ ! -d ~/${RELEASE} ]
then
echo "Release ${RELEASE} does not exist!"
echo "Verify parameters and try again"
echo " "
exit 1
fi

#######################################################
### verify tar file exists
#######################################################
if [ ! -a ${TARFILE} ]
then
echo "Tar file ${TARFILE} does NOT exist!"
echo "Verify parameters and try again"
echo " "
exit 1
fi
if ll ~/active | grep ${RELEASE}
then
echo "Trying to overlay current working directory ABORT!!!"
exit 99
else
cd ~/${RELEASE}
chmod -R u+w *
zcat ${TARFILE} | tar xvf -
chmod -R u-w *
echo " "
echo "loadTarFile.sh DONE"
fi

What are you trying to do test with:

if ll ~/active | grep ${RELEASE}