wrp/make.ps1
2019-07-16 23:30:40 -07:00

21 lines
490 B
PowerShell

param (
[switch]$clean = $false
)
$env:GOARCH="amd64"
foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) {
$env:GOOS=$os
$o="wrp-$(if ($os -eq "windows") {$os="windows.exe"})$os"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}
}
$env:GOARCH="arm"
$env:GOOS="linux"
$o="wrp-linux-rpi"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}