-
Notifications
You must be signed in to change notification settings - Fork 0
/
ps.html
21 lines (15 loc) · 882 Bytes
/
ps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## Kindly inspired by Porter.sh Windows install script
$COMTRYA_REPO = "comtrya/comtrya"
$COMTRYA_FILE_WINDOWS = "comtrya-x86_64-pc-windows-msvc.exe"
$COMTRYA_LATEST_RELEASE_URI = "https://api.github.com/repos/$COMTRYA_REPO/releases/latest"
$COMTRYA_URL = ((Invoke-RestMethod -Method GET -Uri $COMTRYA_LATEST_RELEASE_URI).assets | Where-Object name -EQ $COMTRYA_FILE_WINDOWS ).browser_download_url
$COMTRYA_HOME="$env:USERPROFILE\.comtrya"
echo "Installing comtrya to $COMTRYA_HOME"
mkdir -f $COMTRYA_HOME
(new-object System.Net.WebClient).DownloadFile("$COMTRYA_URL", "$COMTRYA_HOME\comtrya.exe")
echo ""
echo "Installed $(& $COMTRYA_HOME\comtrya.exe --version)"
echo ""
echo "Installation complete."
echo "Add comtrya to your path by adding the following line to your Microsoft.PowerShell_profile.ps1 and open a new terminal:"
echo '$env:PATH+=";$env:USERPROFILE\.comtrya"'