Skip to content

Commit

Permalink
ghcup: Adjust step 1 text format
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Dec 27, 2024
1 parent 88ca7d4 commit 1a8c48e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions docs/ghcup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ Stackage 源使用。

**第一步(可选)** :使用科大源安装 GHCup 本体。如已经安装 GHCup,可跳到下一步。

Linux, FreeBSD, macOS 用户:在终端中运行如下命令
```bash
curl --proto '=https' --tlsv1.2 -sSf https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell | BOOTSTRAP_HASKELL_YAML=https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml sh
```
Windows 用户:以非管理员身份在 PowerShell 中运行如下命令
```bash
$env:BOOTSTRAP_HASKELL_YAML = 'https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml'
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
```
Linux, FreeBSD, macOS 用户:在终端中运行如下命令:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell | BOOTSTRAP_HASKELL_YAML=https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml sh
```

Windows 用户:以非管理员身份在 PowerShell 中运行如下命令:

```powershell
$env:BOOTSTRAP_HASKELL_YAML = 'https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml'
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
```

**第二步** :配置 GHCup 使用科大源。编辑 `~/.ghcup/config.yaml` 增加如下配置:

Expand Down

0 comments on commit 1a8c48e

Please sign in to comment.