wrp/make.ps1

21 lines
490 B
PowerShell
Raw Normal View History

2019-07-17 06:30:40 +00:00
param (
[switch]$clean = $false
)
2019-07-17 06:20:52 +00:00
$env:GOARCH="amd64"
foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) {
$env:GOOS=$os
2019-07-17 06:30:40 +00:00
$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"
}
2019-07-17 06:20:52 +00:00
}
$env:GOARCH="arm"
$env:GOOS="linux"
2019-07-17 06:30:40 +00:00
$o="wrp-linux-rpi"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}