From 3e55a70971c5ff0d035daa54ca5dfab95dfaaa1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F?= Date: Mon, 2 Sep 2019 19:38:30 +0800 Subject: [PATCH] docs(readme): Improve installation instructions (#3600) --- README.md | 18 +++++++++++------- bin/install.ps1 | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7bdc53a2f..2e965f4a5 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,13 @@ If you've built software that you'd like others to use, Scoop is an alternative ## Installation -Run this command from your PowerShell to install scoop to its default location (`C:\Users\\scoop`) +Run the following command from your PowerShell to install scoop to its default location (`C:\Users\\scoop`) ```powershell -iex (new-object net.webclient).downloadstring('https://get.scoop.sh') +Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + +# or shorter +iwr -useb get.scoop.sh | iex ``` Once installed, run `scoop help` for instructions. @@ -76,19 +79,20 @@ The default setup is configured so all user installed programs and Scoop itself Globally installed programs (`--global`) live in `C:\ProgramData\scoop`. These settings can be changed through environment variables. -### Install Scoop to a Custom Directory +### Install Scoop to a Custom Directory by changing `SCOOP` ```powershell $env:SCOOP='D:\Applications\Scoop' [Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User') -iex (new-object net.webclient).downloadstring('https://get.scoop.sh') +# run the installer ``` -### Configure Scoop to install global programs to a Custom Directory +### Configure Scoop to install global programs to a Custom Directory by changing `SCOOP_GLOBAL` ```powershell $env:SCOOP_GLOBAL='F:\GlobalScoopApps' [Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine') +# run the installer ``` ## [Documentation](https://github.com/lukesampson/scoop/wiki) @@ -146,11 +150,11 @@ The following buckets are known to scoop: The main bucket is installed by default. To add any of the other buckets, type: ``` -> scoop bucket add bucketname +scoop bucket add bucketname ``` For example, to add the extras bucket, type: ``` -> scoop bucket add extras +scoop bucket add extras ``` ## Other application buckets diff --git a/bin/install.ps1 b/bin/install.ps1 index 51fa4549b..781ba03a4 100644 --- a/bin/install.ps1 +++ b/bin/install.ps1 @@ -1,7 +1,7 @@ #Requires -Version 5 # remote install: -# iex (new-object net.webclient).downloadstring('https://get.scoop.sh') +# Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') $old_erroractionpreference = $erroractionpreference $erroractionpreference = 'stop' # quit if anything goes wrong