From 1076269f279a430df0a7ee0b72b08f8e39f67ced Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 20 Dec 2021 10:36:14 +0100
Subject: [PATCH] packages2install: show all packages if no filter matched

---
 check_packages2install | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/check_packages2install b/check_packages2install
index 44af8ec..9d6e248 100755
--- a/check_packages2install
+++ b/check_packages2install
@@ -19,6 +19,7 @@
 # 2021-08-20  v1.5  <martin.gasser@iml.unibe.ch> bug fixing - missing sudo in yum command
 # 2021-12-16  v1.6  <axel.hahn@iml.unibe.ch> show filtered overview
 # 2021-12-17  v1.7  <axel.hahn@iml.unibe.ch> show non matching packages in section "other"
+# 2021-12-20  v1.8  <axel.hahn@iml.unibe.ch> show all packages if no filter matched
 # ======================================================================
 
 
@@ -218,12 +219,13 @@ function showFilteredPackages(){
       # show count of non matching packages
       typeset -i iOther=$iTotal-$iFound
       if [ $iFound -eq 0 ]; then
-          echo "No package matched a group filter."
+          echo "Remark: No package matched a group filter."
+          echo "--- All packages:"
       else
           echo "--- Other packages: $iOther"
-          echo "$pkgsum" | _filterPkg "${filterAll}" "-v" | nl
-          echo
       fi
+      echo "$pkgsum" | _filterPkg "${filterAll}" "-v" | nl
+      echo
 
       # total packages
       echo Total packages to install: $iTotal
-- 
GitLab