Skip to content

Instantly share code, notes, and snippets.

@dburriss
Last active September 28, 2018 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dburriss/0f5253f6b2f465c3f81ac830cbf92e1e to your computer and use it in GitHub Desktop.
Save dburriss/0f5253f6b2f465c3f81ac830cbf92e1e to your computer and use it in GitHub Desktop.
Installs ADR tools into git bash directory
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# $tag = (Invoke-WebRequest -Uri https://api.github.com/repos/npryce/adr-tools/releases | ConvertFrom-Json)[0].tag_name
# Set explicit version due to https://github.com/npryce/adr-tools/issues/71
$tag = "2.1.0"
$uri = " https://github.com/npryce/adr-tools/archive/" + $tag + ".zip"
Invoke-WebRequest $uri -OutFile C:\Temp\adr.zip
Expand-Archive "C:\Temp\adr.zip" -Force -DestinationPath "C:\Temp\"
$src = "C:\Temp\adr-tools-" + $tag + "\src\*"
Copy-Item -Force -Recurse -Verbose $src -Destination "C:\Program Files\Git\usr\bin\"
@dburriss
Copy link
Author

dburriss commented Sep 27, 2018

Required: Run as Administrator
Required: Powershell v5+

You can run the above with a single command

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "iex (Invoke-WebRequest 'https://gist.githubusercontent.com/dburriss/0f5253f6b2f465c3f81ac830cbf92e1e/raw/6ab29df7883bbfafd08adc1f76f0c975da14eee1/Install-ADR-to-gitbash.ps1')"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment