Skip to content
This repository
tree: e19c7a7d05
Fetching contributors…

Cannot retrieve contributors at this time

executable file 25 lines (22 sloc) 0.778 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/bin/sh
:;exec emacs --script "$0" "$@"

(defun difference (left right)
  "compare two lists"
  (let ((caleft (car left))
        (caright (car right)))
    (cond
     ((not left) right)
     ((not right) left)
     ((string< caleft caright)
      (cons caleft (difference (cdr left) right)))
     ((string< caright caleft)
      (cons caright (difference left (cdr right))))
     (t (difference (cdr left) (cdr right))))))

(defun stripstuff (fn)
  "strip the date and extension"
  (string-match "\\\(.*\\\)-[0-9]+\.\\\(el$\\\|tar$\\\)" fn)
  (match-string 1 fn))

(mapc 'message
      (difference
       (sort (directory-files "recipes/" nil "[^.].*") 'string<)
       (sort (mapcar 'stripstuff (directory-files "packages/" nil "[^.].*\\\(el$\\\|tar$\\\)")) 'string<)))
Something went wrong with that request. Please try again.