1package dgrb
2
3import (
4 "git.sr.ht/~chld/dgr/cmd"
5 //"git.sr.ht/~chld/dgr/extra"
6 "path/filepath"
7)
8
9func Build(pkg string, do string) {
10 var makefile string = "ndmake.sh"
11 dgr.Msg("running ", do, " for ", pkg)
12
13 pk, b := dgr.FindPkg(pkg)
14 if !b {
15 dgr.Die("couldnt find package", pkg, 1)
16 }
17
18 err := dgr.Run("sh", filepath.Join(pk, makefile), do)
19 if err != nil {
20 dgr.Die(do+" failed", pkg, 1)
21 }
22}