+
To install on Linux, macOS, FreeBSD or WSL2
+
run the following in a terminal (as a non-root user):
+
-
Windows
-
Run the following in a PowerShell session (as a non-admin user):
+
+
To install on Windows
+
run the following in a PowerShell session (as a non-admin user):
+
+
+
+
+
+Need help? Ask on IRC , Discord , or report a bug
+
+
+
+----
+
+![GHCup](./ghcup.gif){: .center style="width:700px"}
+
diff --git a/docs/install.md b/docs/install.md
index cc5c0a5..d5bb299 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -1,6 +1,8 @@
# Getting started
-Let's get started....
+GHCup makes it easy to install specific versions of GHC on GNU/Linux,
+macOS (aka Darwin), FreeBSD and Windows and can also bootstrap a fresh [Haskell developer environment](./install/#supported-tools) from scratch.
+It follows the unix UNIX philosophy of [do one thing and do it well](https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well). Similar in scope to [rustup](https://github.com/rust-lang-nursery/rustup.rs), [pyenv](https://github.com/pyenv/pyenv) and [jenv](http://www.jenv.be).
## Installation
@@ -20,7 +22,9 @@ For Windows, run this in a PowerShell session:
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
```
-Advanced users may want to perform a [manual installation](#manual-install) and GPG verify the binaries.
+If you want to know what these scripts do, check out the [source code at the repository](https://gitlab.haskell.org/haskell/ghcup-hs/-/tree/master/scripts/bootstrap). Advanced users may want to perform a [manual installation](#manual-install) and GPG verify the binaries.
+
+**Advice: Make sure to check out the [Haskell documentation](https://www.haskell.org/documentation/) after installation.**
## Supported tools
@@ -98,4 +102,3 @@ export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
## Vim integration
See [ghcup.vim](https://github.com/hasufell/ghcup.vim).
-
diff --git a/docs/irc.svg b/docs/irc.svg
new file mode 100644
index 0000000..5660201
--- /dev/null
+++ b/docs/irc.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+
diff --git a/docs/javascripts/extra.js b/docs/javascripts/extra.js
index 15c6c58..ca3b73e 100644
--- a/docs/javascripts/extra.js
+++ b/docs/javascripts/extra.js
@@ -1,3 +1,93 @@
+var platforms = ["win", "unix"];
+var platform_override = null;
+
+function detect_platform() {
+ "use strict";
+
+ if (platform_override !== null) {
+ return "unknown";
+ }
+
+ var os = "unknown";
+
+ if (navigator.platform == "Linux x86_64") {os = "unix";}
+ if (navigator.platform == "Linux i686") {os = "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 armv8l") {os = "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 == "Win64" ||
+ navigator.userAgent.indexOf("WOW64") != -1 ||
+ navigator.userAgent.indexOf("Win64") != -1) {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";}
+
+ // I wish I knew by now, but I don't. Try harder.
+ if (os == "unknown") {
+ if (navigator.appVersion.indexOf("Win")!=-1) {os = "win";}
+ if (navigator.appVersion.indexOf("Mac")!=-1) {os = "unix";}
+ if (navigator.appVersion.indexOf("FreeBSD")!=-1) {os = "unix";}
+ }
+
+ // Firefox Quantum likes to hide platform and appVersion but oscpu works
+ if (navigator.oscpu) {
+ if (navigator.oscpu.indexOf("Win32")!=-1) {os = "win";}
+ if (navigator.oscpu.indexOf("Win64")!=-1) {os = "win";}
+ if (navigator.oscpu.indexOf("Mac")!=-1) {os = "unix";}
+ if (navigator.oscpu.indexOf("Linux")!=-1) {os = "unix";}
+ if (navigator.oscpu.indexOf("FreeBSD")!=-1) {os = "unix";}
+ // if (navigator.oscpu.indexOf("NetBSD")!=-1) {os = "unix";}
+ }
+
+ return os;
+}
+
+function adjust_for_platform() {
+ "use strict";
+
+ var platform = detect_platform();
+
+ if (platforms.includes(platform)) {
+ platforms.forEach(function (platform_elem) {
+ var platform_div = document.getElementById("ghcup-instructions-" + platform_elem);
+ platform_div.style.display = "none";
+ if (platform == platform_elem) {
+ platform_div.style.display = "block";
+ }
+ });
+ }
+}
+
+
+function show_all_platforms() {
+ platforms.forEach(function (platform_elem) {
+ var platform_div = document.getElementById("ghcup-instructions-" + platform_elem);
+ platform_div.style.display = "block";
+ });
+
+ var buttons = document.getElementsByClassName("show-all-platforms");
+ console.log(buttons);
+ Array.from(buttons).forEach(function (button) {
+ button.style.display = "none";
+ });
+
+}
+
+function set_up_default_platform_buttons() {
+ var defaults_buttons = document.getElementsByClassName('show-all-platforms-button');
+ for (var i = 0; i < defaults_buttons.length; i++) {
+ defaults_buttons[i].onclick = show_all_platforms;
+ }
+}
+
function copyToClipboardNux() {
const text = document.getElementById("ghcup-command-linux").innerText;
const el = document.createElement('textarea');
@@ -21,3 +111,9 @@ function copyToClipboardWin() {
const button = document.getElementById("ghcup-windows-button");
button.focus();
}
+
+(function () {
+ adjust_for_platform();
+ set_up_default_platform_buttons();
+}());
+