Better logic to determine which packages are installed

Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
Matthew Stidham
2021-03-26 14:01:54 -07:00
parent 0521f1b063
commit 6593090a8c

View File

@@ -20,9 +20,9 @@ present=(
)
killcommand=0
for i in "${present[@]}"; do
$present=$(rpm -qa | grep i)
present=$(expr length "$(rpm -qa | grep $i)")
if [[ $present -gt 0 ]]; then
pass
:
else
killcommand=1
echo "Please install $i on your system"
@@ -32,7 +32,7 @@ done
if [[ $killcommand -gt 0 ]]; then
exit 1
else
pass
:
fi
output_dir=diag_report