Commit 1cd913b0 authored by Cristian Maglie's avatar Cristian Maglie

Fixed tool flavor detection for 32-bits systems

Fixes #20
Fixes #25
parent 3396c78b
......@@ -163,17 +163,17 @@ func (f *Flavour) isCompatibleWith(osName, osArch string) bool {
return regexpArmLinux.MatchString(f.OS)
case "linux,amd64":
return regexpAmd64.MatchString(f.OS)
case "linux,i386":
case "linux,386":
return regexpi386.MatchString(f.OS)
case "windows,i386", "windows,amd64":
case "windows,386", "windows,amd64":
return regexpWindows.MatchString(f.OS)
case "darwin,amd64":
return regexpmac32Bit.MatchString(f.OS) || regexpMac64Bit.MatchString(f.OS)
case "darwin,i386":
case "darwin,386":
return regexpmac32Bit.MatchString(f.OS)
case "freebsd,arm":
return regexpArmBSD.MatchString(f.OS)
case "freebsd,i386", "freebsd,amd64":
case "freebsd,386", "freebsd,amd64":
genericFreeBSDexp := regexp.MustCompile(osArch + "%s-freebsd[0-9]*")
return genericFreeBSDexp.MatchString(f.OS)
}
......
......@@ -28,15 +28,15 @@ func TestFlavorCompatibility(t *testing.T) {
Os string
Arch string
}
windowsi386 := &os{"windows", "i386"}
windowsi386 := &os{"windows", "386"}
windowsx8664 := &os{"windows", "amd64"}
linuxi386 := &os{"linux", "i386"}
linuxi386 := &os{"linux", "386"}
linuxamd64 := &os{"linux", "amd64"}
linuxarm := &os{"linux", "arm"}
linuxarmbe := &os{"linux", "armbe"}
darwini386 := &os{"darwin", "i386"}
darwini386 := &os{"darwin", "386"}
darwinamd646 := &os{"darwin", "amd64"}
freebsdi386 := &os{"freebsd", "i386"}
freebsdi386 := &os{"freebsd", "386"}
freebsdamd64 := &os{"freebsd", "amd64"}
oses := []*os{
windowsi386,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment