Support wildcards in :files option

This commit is contained in:
Steve Purcell 2012-01-28 20:00:13 +00:00
parent db4746fcac
commit 81e9a89448

View file

@ -250,6 +250,11 @@
(interactive)
(mapc 'package-build-archive pkgs))
(defun package-expand-file-list (dir files)
"Expand `FILES', some of which may be wildcards, relative to `DIR'."
(let ((default-directory dir))
(mapcan 'file-expand-wildcards files)))
(defun package-build-archive (file-name)
"build a package archive"
(interactive)
@ -263,7 +268,6 @@
(if cfg
(let* ((repo-type (plist-get cfg :fetcher))
(repo-url (plist-get cfg :url))
(files (plist-get cfg :files))
(version
(cond
((eq repo-type 'svn)
@ -276,6 +280,7 @@
((eq repo-type 'darcs)
(print 'Darcs)
(package-build-checkout-darcs repo-url pkg-cwd))))
(files (package-expand-file-list pkg-cwd (plist-get cfg :files)))
(default-directory package-build-working-dir))
(cond
((= 1 (length files))