]> code.delx.au - gnu-emacs-elpa/blobdiff - admin/archive-contents.el
Merge commit 'fea2a8b1c10f9f29ba6924b17892de670b650756'
[gnu-emacs-elpa] / admin / archive-contents.el
old mode 100644 (file)
new mode 100755 (executable)
index 5f056ba..c53f4ba
@@ -69,7 +69,10 @@ Delete backup files also."
              (if (file-exists-p autoloads-file)
                  (delete-file autoloads-file))
              (archive--delete-elc-files dir)
-             (let ((metadata (archive--metadata dir pkg)))
+             (let ((metadata (or (with-demoted-errors
+                                    ;;(format "batch-make-archive %s: %%s" dir)
+                                    (archive--metadata dir pkg))
+                                  '(nil "0"))))
                 ;; (nth 1 metadata) is nil for "org" which is the only package
                 ;; still using the "org-pkg.el file to specify the metadata.
                 (if (and (nth 1 metadata)
@@ -164,7 +167,7 @@ EXTRAS is an alist with additional metadata.
 
 PKG is the name of the package and DIR is the directory where it is."
   (let* ((mainfile (expand-file-name (concat pkg ".el") dir))
-         (files (directory-files dir nil "\\.el\\'")))
+         (files (directory-files dir nil "\\`dir\\'\\|\\.el\\'")))
     (setq files (delete (concat pkg "-pkg.el") files))
     (setq files (delete (concat pkg "-autoloads.el") files))
     (cond
@@ -198,7 +201,7 @@ PKG is the name of the package and DIR is the directory where it is."
                   (list (cons :url url)
                         (cons :keywords keywords)))))))
      (t
-      (error "Can find main file %s file in %s" mainfile dir)))))
+      (error "Can't find main file %s file in %s" mainfile dir)))))
 
 (defun archive--process-simple-package (dir pkg vers desc req extras)
   "Deploy the contents of DIR into the archive as a simple package.