commit a17b989

chld  ·  2026-09-13 14:08:12 +0000 UTC
parent a80e8cf
checks
1 files changed,  +7, -3
+7, -3
 1@@ -2,6 +2,9 @@
 2 ;; everything will be stubbed todat because i need to implement
 3 ;; package finding and shit
 4 
 5+(define (installed? pkg)
 6+  (file-exists? (format #f "~a/~a/lock" DULL_DB pkg)))
 7+
 8 (define (_find-pkg pkg)
 9   (let pp (
10 	   (p (string-split DULL_PATH #\:))
11@@ -48,7 +51,7 @@
12 
13 (define (inst-pkg pkg)
14   (msg (format #f "~ainstalling package ~a~a~a"
15-	       (if (file-exists? (format #f "~a/~a/lock" DULL_DB pkg))
16+	       (if (installed? pkg)
17 		   "re" "")
18 	       "\x1b[33m" pkg "\x1b[m") "->")
19 
20@@ -115,7 +118,7 @@
21 	(fc (+ n 1))))
22     
23     (msg (format #f "package ~a~a~a successfully ~ainstalled" "\x1b[33m" pkg "\x1b[m"
24-		 (if (file-exists? (format #f "~a/~a/lock" DULL_DB pkg))
25+		 (if (installed? pkg)
26 		     "re" "")
27 		 ) "-->")
28     ))
29@@ -132,7 +135,8 @@
30 				    )))
31 	 (rl '())
32 	 )
33-    (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))
34+    (unless (installed? pkg)
35+      (die (format #f "package ~a~a~a does not have a lock (not installed?)" "\x1b[33m" pkg "\x1b[0m") 2))
36 
37     (let fp ((n 0))
38       (unless (= n (length pf))