Mercurial > hg > octave-nkf
diff scripts/pkg/pkg.m @ 8174:ea9b5f31bfac
pkg.m: better handling of filenames with spaces
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 02 Oct 2008 15:00:28 -0400 |
parents | 9ba45b125ee8 |
children | cf59d542f33e |
line wrap: on
line diff
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -1281,21 +1281,10 @@ m = dir (fullfile (src, "*.m")); oct = dir (fullfile (src, "*.oct")); mex = dir (fullfile (src, "*.mex")); - archdependent = ""; - archindependent = ""; - filenames = ""; - if (length (m) > 0) - filenames = sprintf (fullfile (src, "%s "), m.name); - endif - if (length (oct) > 0) - filenames = cstrcat (filenames, " ", - sprintf (fullfile (src, "%s "), oct.name)); - endif - if (length (mex) > 0) - filenames = cstrcat (filenames, " ", - sprintf (fullfile (src, "%s "), mex.name)); - endif - filenames = split_by (filenames, " "); + + filenames = cellfun (@(x) fullfile (src, x), + {m.name, oct.name, mex.name}, + "UniformOutput", false); endif ## Split into architecture dependent and independent files