Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghcup
Commits
9b2cb028
Unverified
Commit
9b2cb028
authored
6 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
[www] Make a distinction between unix, linux, mac, ...
parent
c9023047
No related branches found
No related tags found
1 merge request
!78
Add ghcup www, design from rustup
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
www/ghcup.css
+6
-4
6 additions, 4 deletions
www/ghcup.css
www/ghcup.js
+22
-22
22 additions, 22 deletions
www/ghcup.js
www/index.html
+17
-5
17 additions, 5 deletions
www/index.html
with
45 additions
and
31 deletions
www/ghcup.css
+
6
−
4
View file @
9b2cb028
...
...
@@ -63,7 +63,7 @@ body#idx > * {
margin-left
:
auto
;
margin-right
:
auto
;
text-align
:
center
;
width
:
3
0
em
;
width
:
3
1
em
;
}
body
#idx
>
#pitch
{
...
...
@@ -88,7 +88,7 @@ body#idx p.other-platforms-help {
background-color
:
rgb
(
250
,
250
,
250
);
margin-left
:
auto
;
margin-right
:
auto
;
width
:
4
6
rem
;
width
:
4
5
rem
;
text-align
:
center
;
border-radius
:
3px
;
border
:
1px
solid
rgb
(
204
,
204
,
204
);
...
...
@@ -96,7 +96,7 @@ body#idx p.other-platforms-help {
}
.instructions
>
*
{
width
:
4
3
rem
;
width
:
4
5
rem
;
margin-left
:
auto
;
margin-right
:
auto
;
}
...
...
@@ -106,7 +106,9 @@ hr {
margin-bottom
:
2em
;
}
#platform-instructions-unix
>
pre
,
#platform-instructions-linux
>
pre
,
#platform-instructions-mac
>
pre
,
#platform-instructions-freebsd
>
pre
,
#platform-instructions-win32
>
pre
,
#platform-instructions-win64
>
pre
,
#platform-instructions-default
>
div
>
pre
,
...
...
This diff is collapsed.
Click to expand it.
www/ghcup.js
+
22
−
22
View file @
9b2cb028
var
platforms
=
[
"
default
"
,
"
unknown
"
,
"
win32
"
,
"
win64
"
,
"
unix
"
];
var
platforms
=
[
"
default
"
,
"
unknown
"
,
"
win32
"
,
"
win64
"
,
"
linux
"
,
"
freebsd
"
,
"
mac
"
];
var
platform_override
=
null
;
function
detect_platform
()
{
...
...
@@ -10,41 +10,41 @@ function detect_platform() {
var
os
=
"
unknown
"
;
if
(
navigator
.
platform
==
"
Linux x86_64
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux i686
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux i686 on x86_64
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux aarch64
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv6l
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv7l
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv8l
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux ppc64
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux mips
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Linux mips64
"
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
platform
==
"
Mac
"
)
{
os
=
"
unix
"
;}
if
(
navigator
.
platform
==
"
Linux x86_64
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux i686
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux i686 on x86_64
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux aarch64
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv6l
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv7l
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux armv8l
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux ppc64
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux mips
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Linux mips64
"
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
platform
==
"
Mac
"
)
{
os
=
"
mac
"
;}
if
(
navigator
.
platform
==
"
Win32
"
)
{
os
=
"
win32
"
;}
if
(
navigator
.
platform
==
"
Win64
"
||
navigator
.
userAgent
.
indexOf
(
"
WOW64
"
)
!=
-
1
||
navigator
.
userAgent
.
indexOf
(
"
Win64
"
)
!=
-
1
)
{
os
=
"
win64
"
;
}
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
==
"
FreeBSD x86_64
"
)
{
os
=
"
freebsd
"
;}
if
(
navigator
.
platform
==
"
FreeBSD amd64
"
)
{
os
=
"
freebsd
"
;}
//
if (navigator.platform == "NetBSD x86_64") {os = "unix";}
//
if (navigator.platform == "NetBSD amd64") {os = "unix";}
// I wish I knew by now, but I don't. Try harder.
if
(
os
==
"
unknown
"
)
{
if
(
navigator
.
appVersion
.
indexOf
(
"
Win
"
)
!=-
1
)
{
os
=
"
win32
"
;}
if
(
navigator
.
appVersion
.
indexOf
(
"
Mac
"
)
!=-
1
)
{
os
=
"
unix
"
;}
if
(
navigator
.
appVersion
.
indexOf
(
"
FreeBSD
"
)
!=-
1
)
{
os
=
"
unix
"
;}
if
(
navigator
.
appVersion
.
indexOf
(
"
Mac
"
)
!=-
1
)
{
os
=
"
mac
"
;}
if
(
navigator
.
appVersion
.
indexOf
(
"
FreeBSD
"
)
!=-
1
)
{
os
=
"
freebsd
"
;}
}
// Firefox Quantum likes to hide platform and appVersion but oscpu works
if
(
navigator
.
oscpu
)
{
if
(
navigator
.
oscpu
.
indexOf
(
"
Win32
"
)
!=-
1
)
{
os
=
"
win32
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
Win64
"
)
!=-
1
)
{
os
=
"
win64
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
Mac
"
)
!=-
1
)
{
os
=
"
unix
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
Linux
"
)
!=-
1
)
{
os
=
"
uni
x
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
FreeBSD
"
)
!=-
1
)
{
os
=
"
unix
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
NetBSD
"
)
!=-
1
)
{
os
=
"
unix
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
Mac
"
)
!=-
1
)
{
os
=
"
mac
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
Linux
"
)
!=-
1
)
{
os
=
"
linu
x
"
;}
if
(
navigator
.
oscpu
.
indexOf
(
"
FreeBSD
"
)
!=-
1
)
{
os
=
"
freebsd
"
;}
//
if (navigator.oscpu.indexOf("NetBSD")!=-1) {os = "unix";}
}
return
os
;
...
...
This diff is collapsed.
Click to expand it.
www/index.html
+
17
−
5
View file @
9b2cb028
...
...
@@ -24,10 +24,22 @@
the
general
purpose
language
<
a
href
=
"
https://www.haskell.org/
"
>
Haskell
<
/a
>
<
/p
>
<
div
id
=
"
platform-instructions-
uni
x
"
class
=
"
instructions
"
style
=
"
display: none;
"
>
<
div
id
=
"
platform-instructions-
linu
x
"
class
=
"
instructions
"
style
=
"
display: none;
"
>
<
p
>
Run
the
following
in
your
terminal
,
then
follow
the
onscreen
instructions
.
<
/p
>
<
pre
>
curl
https
:
//get-ghcup.haskell.org -sSf | sh
<
/pre
>
<
p
class
=
"
other-platforms-help
"
>
You
appear
to
be
running
Unix
.
If
not
,
<
a
class
=
"
default-platform-button
"
href
=
"
#
"
>
display
all
supported
installers
<
/a>.</
p
>
<
p
class
=
"
other-platforms-help
"
>
You
appear
to
be
running
Linux
.
If
not
,
<
a
class
=
"
default-platform-button
"
href
=
"
#
"
>
display
all
supported
installers
<
/a>.</
p
>
<
/div
>
<
div
id
=
"
platform-instructions-mac
"
class
=
"
instructions
"
style
=
"
display: none;
"
>
<
p
>
Run
the
following
in
your
terminal
,
then
follow
the
onscreen
instructions
.
<
/p
>
<
pre
>
curl
https
:
//get-ghcup.haskell.org -sSf | sh
<
/pre
>
<
p
class
=
"
other-platforms-help
"
>
You
appear
to
be
running
Mac
OS
X
.
If
not
,
<
a
class
=
"
default-platform-button
"
href
=
"
#
"
>
display
all
supported
installers
<
/a>.</
p
>
<
/div
>
<
div
id
=
"
platform-instructions-freebsd
"
class
=
"
instructions
"
style
=
"
display: none;
"
>
<
p
>
Run
the
following
in
your
terminal
,
then
follow
the
onscreen
instructions
.
<
/p
>
<
pre
>
curl
https
:
//get-ghcup.haskell.org -sSf | sh
<
/pre
>
<
p
class
=
"
other-platforms-help
"
>
You
appear
to
be
running
FreeBSD
.
If
not
,
<
a
class
=
"
default-platform-button
"
href
=
"
#
"
>
display
all
supported
installers
<
/a>.</
p
>
<
/div
>
<
div
id
=
"
platform-instructions-win32
"
class
=
"
instructions
"
>
...
...
@@ -65,7 +77,7 @@
<!-- duplicate the default cross-platform instructions -->
<div>
<p>If you are running
Unix
,<br/>run the following in your terminal, then follow the onscreen instructions.</p>
<p>If you are running
Linux, Mac OS X or FreeBSD
,<br/>run the following in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://get-ghcup.haskell.org -sSf | sh</pre>
</div>
...
...
@@ -82,7 +94,7 @@
<div id="platform-instructions-default" class="instructions">
<div>
<p>To install Haskell, if you are running
Unix
,<br/>run the following
<p>To install Haskell, if you are running
Linux, Mac OS X or FreeBSD
,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://get-ghcup.haskell.org -sSf | sh</pre>
</div>
...
...
@@ -126,7 +138,7 @@
<div
id=
"platform-instructions-default"
class=
"instructions"
>
<div>
<p>
To install Haskell, if you are running
Unix
,
<br/>
run the following
<p>
To install Haskell, if you are running
Linux, Mac OS X or FreeBSD
,
<br/>
run the following
in your terminal, then follow the onscreen instructions.
</p>
<pre>
curl https://get-ghcup.haskell.org -sSf | sh
</pre>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment