commit a2d5285
chld
·
2026-09-12 14:18:01 +0000 UTC
parent 175c408
yay type checking done
1 files changed,
+18,
-20
M
pkg.scm
M
pkg.scm
+18,
-20
1@@ -53,35 +53,33 @@
2 (let* (
3 (pl (format #f "~a/~a/lock" DULL_DB pkg))
4 (pf (remove string-null? (call-with-input-file pl
5- (lambda (f)
6- (string-split (read-string f) #\newline)
7- )
8- ))
9- )
10+ (lambda (f)
11+ (string-split (read-string f) #\newline)
12+ )
13+ )))
14 )
15 (unless (file-exists? pl) (die (format #f "package ~a~a~a does not have a lock file (not installed?)" "\x1b[33m" pkg "\x1b[0m") 2))
16
17- (let fp (
18- (n 0)
19- )
20+ (let fp ((n 0))
21 (unless (= n (length pf))
22- (when (eq?
23- (stat:type (stat (list-ref pf n))) 'regular
24- )
25- (format #t "~a file~%" (list-ref pf n))
26- )
27- (fp (+ n 1))
28- )
29- )
30+ (when (eq? (stat:type (stat (list-ref pf n))) 'regular)
31+ (format #t "~a file~%" (list-ref pf n)))
32+ (fp (+ n 1))))
33+
34+ (let dp ((n 0))
35+ (unless (= n (length pf))
36+ (when (eq? (stat:type (stat (list-ref pf n))) 'directory)
37+ (format #t "~a dir~%" (list-ref pf n)))
38+ (dp (+ n 1))))
39 )
40 )
41
42 (define (pm-pkg pkg)
43 (format #t "~a"
44- (call-with-input-file (format #f "~a/~a/lock" DULL_DB pkg)
45- (lambda (f) (read-string f))
46- )
47- )
48+ (call-with-input-file (format #f "~a/~a/lock" DULL_DB pkg)
49+ (lambda (f) (read-string f))
50+ )
51+ )
52 )
53
54 (define (build-pkg pkg)