pm/pkg/install.go

26 lines
495 B
Go
Raw Normal View History

2018-03-03 21:28:24 -08:00
package pkg
import (
"log"
2018-03-03 21:28:24 -08:00
"github.com/pkg/errors"
"mcquay.me/pm/db"
2018-03-03 21:28:24 -08:00
)
// Install fetches and installs pkgs from appropriate remotes.
func Install(root string, pkgs []string) error {
av, err := db.LoadAvailable(root)
if err != nil {
return errors.Wrap(err, "loading available db")
}
ms, err := av.Installable(pkgs)
if err != nil {
return errors.Wrap(err, "checking ability to install")
}
for _, m := range ms {
log.Printf("fake install %v", m)
}
2018-03-03 21:28:24 -08:00
return errors.New("NYI")
}