commit 6dc4da5

chld  ·  2026-09-18 17:22:26 +0000 UTC
parent 8029252
colon split multi package support
1 files changed,  +61, -54
+61, -54
  1@@ -46,62 +46,69 @@
  2 
  3 (desc)
  4 
  5-(let pargs
  6-    (
  7-     (n 0)
  8-     )
  9+(let ppkg
 10+    ((p (string-split pkg #\:))
 11+     (l 0))
 12+  
 13+  (unless (= l (length p))
 14+    (let pargs
 15+	(
 16+	 (n 0)
 17+	 (pk (list-ref p l))
 18+	 )
 19 
 20-  (unless
 21-      (= n (string-length c))
 22+      (unless
 23+	  (= n (string-length c))
 24 
 25-    (case (string-ref c n)
 26-      ((#\h)
 27-       (usage)
 28-       (exit 0)
 29-       )
 30-      ((#\u)
 31-       (let up (
 32-		(s (string-split DULL_PATH #\:))
 33-		(n 0)
 34-		)
 35-	 (unless (= n (length s))
 36-	   (when (file-exists? (format #f "~a/.git/" (list-ref s n)))
 37-	       (begin
 38-		 (chdir (list-ref s n))
 39-		 (system* "git" "pull")
 40+	(case (string-ref c n)
 41+	  ((#\h)
 42+	   (usage)
 43+	   (exit 0)
 44+	   )
 45+	  ((#\u)
 46+	   (let up (
 47+		    (s (string-split DULL_PATH #\:))
 48+		    (n 0)
 49+		    )
 50+	     (unless (= n (length s))
 51+	       (when (file-exists? (format #f "~a/.git/" (list-ref s n)))
 52+		 (begin
 53+		   (chdir (list-ref s n))
 54+		   (system* "git" "pull")
 55+		   )
 56 		 )
 57+	       (up s (+ n 1))
 58 	       )
 59-	   (up s (+ n 1))
 60+	     )
 61 	   )
 62-	 )
 63-       )
 64-      ((#\b)
 65-       (build-pkg pkg)
 66-       )
 67-      ((#\i)
 68-       (seteuid 0)
 69-       (inst-pkg pkg)(desc)
 70-       )
 71-      ((#\c)
 72-       ;; shell out for this until i find a better method
 73-       (system* "rm" "-rf"
 74-		(format #f "~a/pkg-~a-~a" DULL_DIR pkg (ver-pkg pkg))
 75-		(format #f "~a/src-~a-~a" DULL_DIR pkg (ver-pkg pkg))
 76-		)
 77-       )
 78-      ((#\d)
 79-       (seteuid 0)
 80-       (del-pkg pkg)(desc)
 81-       )
 82-      ((#\f)
 83-       (format #t "~a~%" (find-pkg pkg))
 84-       )
 85-      ((#\m)
 86-       (pm-pkg pkg)
 87-       )
 88-      )
 89-    
 90-    (pargs (+ n 1))
 91-    )
 92-  
 93-  )
 94+	  ((#\b)
 95+	   (build-pkg pk)
 96+	   )
 97+	  ((#\i)
 98+	   (seteuid 0)
 99+	   (inst-pkg pk)(desc)
100+	   )
101+	  ((#\c)
102+	   ;; shell out for this until i find a better method
103+	   (system* "rm" "-rf"
104+		    (format #f "~a/pkg-~a-~a" DULL_DIR pkg (ver-pkg pk))
105+		    (format #f "~a/src-~a-~a" DULL_DIR pkg (ver-pkg pk))
106+		    )
107+	   )
108+	  ((#\d)
109+	   (seteuid 0)
110+	   (del-pkg pk)(desc)
111+	   )
112+	  ((#\f)
113+	   (format #t "~a~%" (find-pkg pk))
114+	   )
115+	  ((#\m)
116+	   (pm-pkg pk)
117+	   )
118+	  )
119+	
120+	(pargs (+ n 1))
121+	)
122+      
123+      )(ppkg p (+ n 1))
124+    ))