changeset 27879:b9710ee393ac

Allow multiple package names for each pkg action (bug #57489). * installed_packages.m: Add for loop over input variable "pkgname" to process all packages listed on command line.
author Philip Nienhuis <prnienhuis@users.sf.net>
date Fri, 27 Dec 2019 22:23:00 +0100
parents 2b78bc0ef3c5
children 31b95261c7d2
files scripts/pkg/private/installed_packages.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/private/installed_packages.m	Sat Dec 28 00:58:18 2019 +0100
+++ b/scripts/pkg/private/installed_packages.m	Fri Dec 27 22:23:00 2019 +0100
@@ -52,7 +52,10 @@
 
   ## Check whether info on a particular package was requested
   if (! isempty (pkgname))
-    idx = find (strcmp (pkgname{1}, installed_names));
+    idx = [];
+    for i = 1 : numel (pkgname)
+      idx = [idx, find(strcmp (pkgname{i}, installed_names))];
+    endfor
     if (isempty (idx))
       installed_names = {};
       installed_pkgs_lst = {};