diff options
Diffstat (limited to 'cmd/ponzu/paths.go')
-rw-r--r-- | cmd/ponzu/paths.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cmd/ponzu/paths.go b/cmd/ponzu/paths.go new file mode 100644 index 0000000..73d8d73 --- /dev/null +++ b/cmd/ponzu/paths.go @@ -0,0 +1,24 @@ +package main + +import "runtime" + +// 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 "." +} |