octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: devel build.m. Was: cygwin-related problem ?


From: Julien Bect
Subject: Re: devel build.m. Was: cygwin-related problem ?
Date: Wed, 1 Jun 2016 19:21:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0

Le 01/06/2016 19:16, Julien Bect a écrit :

[~, root_idx] = min (cellfun ("numel", filelist))
root_idx =  4

package_root = filelist{root_idx}
package_root = generate_html.0.1.11/NEWS

any idea how to replace the   min (cellfun ("numel", filelist)) ?

Why not simply something like:

# assuming that there is only one file named DESCRIPTION, for simplicity
idx = find (cellfun (@(s) ~ isempty (regexp (s, "DESCRIPTION$")), filelist)) package_root = fileparts (filelist{idx});

Even better, without the useless call to find:

b = cellfun (@(s) ~ isempty (regexp (s, "DESCRIPTION$")), filelist)
package_root = fileparts (filelist{b});



reply via email to

[Prev in Thread] Current Thread [Next in Thread]