File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 497
497
(defun dist-name-pathname (name)
498
498
" Return the pathname that would be used for an installed dist with
499
499
the given NAME."
500
- (qmerge (make-pathname :directory (list :relative " dists" name))))
500
+ (qmerge (make-pathname :directory (list* :relative
501
+ " dists"
502
+ (split-slashes name)))))
501
503
502
504
(defmethod slot-unbound (class (dist dist) (slot (eql ' base-directory)))
503
505
(declare (ignore class ))
@@ -577,7 +579,7 @@ the given NAME."
577
579
578
580
(defun standard-dist-enumeration-function ()
579
581
" The default function used for producing a list of dist objects."
580
- (loop for file in (directory (qmerge " dists/*/distinfo.txt" ))
582
+ (loop for file in (directory (qmerge " dists/** /distinfo.txt" ))
581
583
collect (make-dist-from-file file)))
582
584
583
585
(defun all-dists ()
Original file line number Diff line number Diff line change 12
12
# :delete-file-if-exists
13
13
# :ensure-file-exists
14
14
# :split-spaces
15
+ # :split-slashes
15
16
# :first-line
16
17
# :file-size
17
18
# :safely-read
Original file line number Diff line number Diff line change 56
56
(when (probe-file pathname )
57
57
(delete-file pathname )))
58
58
59
- (defun split-spaces (line)
59
+ (defun split (line delimiter )
60
60
(let ((words ' ())
61
61
(mark 0 )
62
62
(pos 0 ))
63
63
(labels ((finish ()
64
64
(setf pos (length line))
65
65
(save)
66
- (return-from split-spaces (nreverse words)))
66
+ (return-from split (nreverse words)))
67
67
(save ()
68
68
(when (< mark pos)
69
69
(push (subseq line mark pos) words)))
70
70
(mark ()
71
71
(setf mark pos))
72
72
(in-word (char )
73
- (case char
74
- (#\Space
73
+ (cond
74
+ ((char= char
75
+ delimiter)
75
76
(save)
76
77
#' in-space)
77
78
(t
78
79
#' in-word)))
79
80
(in-space (char )
80
- (case char
81
- (#\Space
81
+ (cond
82
+ ((char= char
83
+ delimiter)
82
84
#' in-space)
83
85
(t
84
86
(mark)
88
90
(setf pos i)
89
91
(setf state (funcall state (char line i))))))))
90
92
93
+ (defun split-spaces (line)
94
+ (split line #\Space ))
95
+
96
+ (defun split-slashes (line)
97
+ (split line #\/ ))
98
+
91
99
(defun first-line (file)
92
100
(with-open-file (stream file)
93
101
(values (read-line stream ))))
You can’t perform that action at this time.
0 commit comments