mirror of
https://github.com/correl/melpa.git
synced 2024-12-21 03:00:09 +00:00
49495e9b06
By recording each package's archive-entry separately we are able to build each recipe independently and then compile the archive contents afterwards.
33 lines
1 KiB
Text
Executable file
33 lines
1 KiB
Text
Executable file
#!/bin/sh
|
|
:;exec emacs --script "$0" "$@"
|
|
|
|
(defun missing-packages (recipes packages)
|
|
"Show elements of RECIPES that are no in PACKAGES."
|
|
(let (missing)
|
|
(while recipes
|
|
(let ((recipe (car recipes))
|
|
(package (car packages)))
|
|
(cond
|
|
((or (not package) (string< recipe package))
|
|
(setq missing (cons recipe missing)))
|
|
((string< package recipe)
|
|
(error "Package has no recipe: %s" package))
|
|
(t (setq packages (cdr packages)))))
|
|
(setq recipes (cdr recipes)))
|
|
(reverse missing)))
|
|
|
|
(defun package-sans-version (fn)
|
|
"Strip the date and extension from FN."
|
|
(string-match "\\(.*\\)-[0-9]+\\.[0-9]+\\.\\(el$\\|tar$\\)" fn)
|
|
(match-string 1 fn))
|
|
|
|
(princ
|
|
(mapconcat 'identity
|
|
(missing-packages
|
|
(sort (directory-files "recipes/" nil "^[^.].*") 'string<)
|
|
(sort (delete-dups
|
|
(mapcar
|
|
'package-sans-version
|
|
(directory-files "packages/" nil "^[^.].*\\\(el$\\\|tar$\\\)")))
|
|
'string<)) "\n"))
|
|
(princ "\n")
|