diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-02-21 18:20:20 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-02-21 18:20:20 -0800 |
commit | 7d912abbd74761c9d20ffbfedd5fede5d4562d06 (patch) | |
tree | 734b2adcc6dfbaec068b63d03c500a52dd807f24 /cmd/ponzu/paths.go | |
parent | 3c7327058bd2ee890d36809fd171f1477e0ebfe5 (diff) |
adding new file to be included in build, new buildOutputPath function to determine exec path
Diffstat (limited to 'cmd/ponzu/paths.go')
-rw-r--r-- | cmd/ponzu/paths.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmd/ponzu/paths.go b/cmd/ponzu/paths.go index 0ab2b06..73d8d73 100644 --- a/cmd/ponzu/paths.go +++ b/cmd/ponzu/paths.go @@ -2,11 +2,23 @@ package main import "runtime" -// buildOutputName returns the correct ponzu-server file name +// buildOutputName returns the correct ponzu-server file name // based on the host Operating System func buildOutputName() string { if runtime.GOOS == "windows" { return "ponzu-server.exe" } + return "ponzu-server" } + +// buildOutputPath returns the correct path to the ponzu-server binary +// built, based on the host Operating System. This is necessary so that +// the UNIX-y systems know to look in the current directory, and not the $PATH +func buildOutputPath() string { + if runtime.GOOS == "windows" { + return "" + } + + return "." +} |