gnu-maintenance: Support .zip files.

Reported by Andreas Enge <andreas@enge.fr>.

* guix/gnu-maintenance.scm (sans-extension): Add case for ".zip".
  (%tarball-rx): Extend to handle .zip extension.
This commit is contained in:
Ludovic Courtès 2014-11-29 22:14:34 +01:00
parent 2184ed9179
commit f5d9604f27
1 changed files with 5 additions and 3 deletions

View File

@ -233,12 +233,14 @@ stored."
(values "ftp.gnu.org" (string-append "/gnu/" project)))))
(define (sans-extension tarball)
"Return TARBALL without its .tar.* extension."
(let ((end (string-contains tarball ".tar")))
"Return TARBALL without its .tar.* or .zip extension."
(let ((end (or (string-contains tarball ".tar")
(string-contains tarball ".zip"))))
(substring tarball 0 end)))
(define %tarball-rx
(make-regexp "^(.+)-([0-9]|[^-])*(-src)?\\.tar\\."))
;; Note: .zip files are notably used for freefont-ttf.
(make-regexp "^(.+)-([0-9]|[^-])*(-src)?\\.(tar\\.|zip$)"))
(define %alpha-tarball-rx
(make-regexp "^.*-.*[0-9](-|~)?(alpha|beta|rc|cvs|svn|git)-?[0-9\\.]*\\.tar\\."))