fun current()

in plugins/src/main/kotlin/org/jetbrains/gradle/plugins/upx/UpxSupportedOperatingSystems.kt [16:33]


        fun current(): UpxSupportedOperatingSystems? {
            val os = OperatingSystem.current()
            val is64 = "64" in System.getProperty("os.arch")
            return when {
                os.isWindows -> if (is64) WINDOWS_x64 else WINDOWS_x86
                os.isLinux -> {
                    val isArm = "arm" in System.getProperty("os.arch") ||
                            "aarch" in System.getProperty("os.arch")
                    when {
                        is64 && isArm -> LINUX_ARM64
                        !is64 && isArm -> LINUX_ARM
                        is64 -> LINUX_x64
                        else -> LINUX_x86
                    }
                }
                else -> null
            }
        }