mirror of
https://github.com/luxfi/corona.git
synced 2026-09-24 00:25:54 +00:00
cmd/m4_uniform_oracle: use luxcppDir() helper, drop hardcoded /Users/z path
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user