don't install meta pkg info for tests

This commit is contained in:
Alex Shinn 2015-05-08 00:01:59 +09:00
parent cee04731f9
commit c8066e2eb7

View file

@ -18,12 +18,23 @@
((eqv? #\return ch) (lp))
(else (lp (cons ch res)))))))
(define (install-library? name)
(and (list? name)
(>= (length name) 2)
(let ((x (car (reverse name))))
(and (not (and (eq? 'test x)
(number? (cadr (reverse name)))))
(let* ((s (if (number? x) (number->string x) (symbol->string x)))
(len (string-length s)))
(not (and (> len 5)
(equal? "-test" (substring s (- len 5) len)))))))))
(define (parse-library file)
(protect (exn (else #f))
(let ((x (call-with-input-file file read)))
(and (pair? x)
(eq? 'define-library (car x))
(list? (cadr x))
(install-library? (cadr x))
(cadr x)))))
(define (extract-libraries)