commit 2396d51
chld
·
2026-09-12 03:18:04 +0000 UTC
parent 3e37d99
begin on cadr parsing
M
cmd.scm
+4,
-0
1@@ -19,3 +19,7 @@
2 (_system "find"
3 (or (getenv "DTR_DIR") "/ports") "-type" "d" "-mindepth" "2" "-maxdepth" "2" "-name" p)
4 )
5+
6+(define (usage)
7+ (format #t "stub~%")
8+ )
M
main.scm
+49,
-2
1@@ -1,5 +1,52 @@
2 (_warn "this will be some sort of libdmake.sh helper in guile")
3 (_system "ls" "/")
4 (inst-pkg "goonapp")
5-(build-pkg "gmake")
6-(die "error" 1)
7+(build-pkg "gmake")(newline)
8+
9+;; parse cadr, e.g. yucbic
10+;;
11+;; y yes
12+;; u update
13+;; c clean
14+;; b build
15+;; i install
16+;; fucky syntax, but lets be different
17+
18+(define c
19+ (if (> (length (command-line)) 1)
20+ (cadr (command-line))
21+ "deadbeef"
22+ ))
23+
24+(when (string=? c "deadbeef")
25+ (begin
26+ (usage)
27+ (exit 1))
28+ )
29+
30+(msg "parsing args")
31+(let pargs
32+ (
33+ (n 0)
34+ )
35+
36+ (unless
37+ (= n (string-length c))
38+
39+ (case (string-ref c n)
40+ ((#\y)
41+ (msg "yes")
42+ )
43+ ((#\u)
44+ (msg "syncing")
45+ )
46+ ((#\b)
47+ (build-pkg "f")
48+ )
49+ )
50+
51+ (pargs (+ n 1))
52+ )
53+
54+ )
55+(newline)