commit 99d2d43

chld  ·  2026-02-07 06:35:57 +0000 UTC
parent be35a6f
yeah. avoid this shit
2 files changed,  +11, -5
+9, -3
 1@@ -141,6 +141,7 @@ func main() {
 2 			}
 3 			dgr.Msg("dependencies of package \033[m\033[33m", pkgs[i], "\033[m:")
 4 			file, _ := os.ReadFile(filepath.Join(x, "deps"))
 5+
 6 			f := strings.Fields(string(file))
 7 			var nf []string // new variable called nf for reordering
 8 			var bt []string // store .
 9@@ -150,21 +151,26 @@ func main() {
10 			var a int
11 			for a < len(f) {
12 				if strings.Contains(f[a], ".") {
13-					bt = append(bt, f[a])
14+					bt = append(bt, strings.ReplaceAll(f[a], ".", ""))
15 				} else if strings.Contains(f[a], "/") {
16-					lt = append(lt, f[a])
17+					lt = append(lt, strings.ReplaceAll(f[a], "/", ""))
18 				} else if strings.Contains(f[a], ">") {
19-					rt = append(rt, f[a])
20+					rt = append(rt, strings.ReplaceAll(f[a], ">", ""))
21 				}
22 				a++
23 				continue
24 			}
25+
26 			nf = append(nf, bt...)
27 			nf = append(nf, lt...)
28 			nf = append(nf, rt...)
29 			// now build dependencies
30+
31 			for n := range len(nf) {
32 				dgrb.Build(nf[n], "make")
33+				dgrb.Inst(nf[n])
34+				n++
35+				continue
36 			}
37 
38 			dgrb.Build(pkgs[i], "make")
+2, -2
 1@@ -10,8 +10,8 @@ import (
 2 
 3 func Inst(pkg string) {
 4 
 5-	pkginst := filepath.Join("/var/tmp/dtr", "pkg-"+pkg+"-git") // hard code git for now
 6-	pk, err := filepath.Glob(pkginst + "/*")
 7+	pkginst := filepath.Join("/var/tmp/dtr", "pkg-"+pkg+"-*")
 8+	pk, err := filepath.Glob(pkginst + "/*") // globbing final boss
 9 
10 	if err != nil || len(pk) == 0 {
11 		dgr.Die("no files to install in", pkginst, 1)