cmd/m4_uniform_oracle: use luxcppDir() helper, drop hardcoded /Users/z path

This commit is contained in:
2026-05-21 14:56:43 -07:00
parent 78efc403f2
commit bc40a9b9f8
+10 -1
View File
@@ -111,7 +111,7 @@ func main() {
})
}
outPath := filepath.Join("/Users/z/work/luxcpp/crypto/corona/test/kat", "uniform_sampler.json")
outPath := filepath.Join(luxcppDir(), "crypto", "corona", "test", "kat", "uniform_sampler.json")
f, err := os.Create(outPath)
if err != nil {
fmt.Fprintln(os.Stderr, err)
@@ -126,3 +126,12 @@ func main() {
}
fmt.Fprintln(os.Stderr, "wrote uniform_sampler.json")
}
// luxcppDir returns the luxcpp source root. LUXCPP_DIR overrides the default
// of $HOME/work/luxcpp.
func luxcppDir() string {
if d := os.Getenv("LUXCPP_DIR"); d != "" {
return d
}
return os.ExpandEnv("$HOME/work/luxcpp")
}