if [ $DISTRO = "REDHAT"] || [ $DISTRO = "FEDORA"]; then
if ! rpm -qa | grep -q glibc-static; then
$BIN_ECHO -e " Package [glibc-static] not found. Installing.. "
yum install glibc-static
elif
$BIN_ECHO -e " All required packages installed.. "
fi
elif [ $DISTRO = "DEBIAN"]; then
if ! dpkg-query -l glibc; then
$BIN_ECHO -e " Package [glibc] not found. Installing.. "
apt-get install glibc
elif
$BIN_ECHO -e " All required packages installed.. "
fi
fi
line 156: syntax error near unexpected token `fi’
How do I put the two statements together?
You must have a space before the final
]on each test.For example:
must be re-written as either:
or
Also note that there is no reason to quote literal strings, but you should quote variables.
You can also do :
or