Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request rust-lang#866 from xen0n/mipsup-www
Browse files Browse the repository at this point in the history
www: MIPS support and cleanups
  • Loading branch information
brson authored and AJ-Ianozi committed Jan 7, 2017
1 parent a5e7e27 commit d710427
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions www/rustup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var platform_override = null;

function android_or_unix() {
return (navigator.appVersion.indexOf("Android") != -1) ? "android" : "unix";
}

function detect_platform() {
"use strict";

Expand All @@ -10,24 +14,21 @@ function detect_platform() {
var os = "unknown";

if (navigator.platform == "Linux x86_64") {os = "unix";}
if (navigator.platform == "Linux i686") {os = "unix";}
if (navigator.platform == "Linux i686") {os = android_or_unix();}
if (navigator.platform == "Linux i686 on x86_64") {os = "unix";}
if (navigator.platform == "Linux aarch64") {os = "unix";}
if (navigator.platform == "Linux armv6l") {os = "unix";}
if (navigator.platform == "Linux armv7l") {os = "unix";}
if (navigator.platform == "Linux aarch64") {os = android_or_unix();}
if (navigator.platform == "Linux armv6l") {os = android_or_unix();}
if (navigator.platform == "Linux armv7l") {os = android_or_unix();}
if (navigator.platform == "Linux ppc64") {os = "unix";}
if (navigator.platform == "Linux mips") {os = "unix";}
if (navigator.platform == "Linux mips64") {os = "unix";}
if (navigator.platform == "Mac") {os = "unix";}
if (navigator.platform == "Win32") {os = "win";}
if (navigator.platform == "FreeBSD x86_64") {os = "unix";}
if (navigator.platform == "FreeBSD amd64") {os = "unix";}
if (navigator.platform == "NetBSD x86_64") {os = "unix";}
if (navigator.platform == "NetBSD amd64") {os = "unix";}

if (navigator.platform == "Linux armv7l"
&& navigator.appVersion.indexOf("Android") != -1 ) {
os = "android";
}

// I wish I knew by now, but I don't. Try harder.
if (os == "unknown") {
if (navigator.appVersion.indexOf("Win")!=-1) {os = "win";}
Expand Down

0 comments on commit d710427

Please sign in to comment.