From eb7f4cded92d7cb35db113b6df94b7d19e32e89d Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 15 Jun 2003 13:50:24 +0000 Subject: [PATCH] r5127: *** empty log message *** --- downloads.lisp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/downloads.lisp b/downloads.lisp index ba8b853..bd260e7 100644 --- a/downloads.lisp +++ b/downloads.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: downloads.lisp,v 1.10 2003/06/07 22:46:04 kevin Exp $ +;;;; $Id: downloads.lisp,v 1.11 2003/06/15 13:49:42 kevin Exp $ ;;;; ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -80,14 +80,24 @@ (when (>= (length name) len-base-name) (string= name *base-name* :end1 len-base-name :end2 len-base-name)))) +(defun match-base-name-latest? (name) + (let* ((latest (concatenate 'string *base-name* "-latest")) + (len-latest (length latest))) + (when (>= (length name) len-latest) + (string= name latest :end1 len-latest :end2 len-latest)))) + (defun filter-against-base (files) (delete-if-not #'(lambda (f) (match-base-name? (pathname-name f))) files)) +(defun filter-latest (files) + (delete-if #'(lambda (f) (match-base-name-latest? (pathname-name f))) files)) + (defun sort-pathnames (list) (sort list #'(lambda (a b) (string< (namestring a) (namestring b))))) (defun display-one-section (title pat) - (let ((files (sort-pathnames (filter-against-base (directory pat))))) + (let ((files (sort-pathnames (filter-latest + (filter-against-base (directory pat)))))) (when files (print-sect-title title) (lml-princ "
") -- 2.34.1