2023-01-22 13:14:48 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"gitea.nulo.in/Nulo/repro-run/runner"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
config, err := readConfig()
|
|
|
|
must(err)
|
2023-01-23 14:50:06 +00:00
|
|
|
must(runner.Run(config, "rootfs/", "cache/", ".", nil, false))
|
2023-01-22 13:14:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func must(err error, where ...string) {
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err, where)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func readConfig() (config runner.Config, err error) {
|
|
|
|
err = json.NewDecoder(os.Stdin).Decode(&config)
|
|
|
|
return
|
|
|
|
}
|