diff options
| -rw-r--r-- | scripts/get.ps1 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1 index 734c61bc5..36fb966af 100644 --- a/scripts/get.ps1 +++ b/scripts/get.ps1 @@ -2,10 +2,11 @@ # usage: (in powershell) # Invoke-Expression (Invoke-Webrequest <my location> -UseBasicParsing).Content +$outfile=($env:TEMP,$env:TMP,'.' -ne $null)[0]+"\$pid-xmake-installer.exe" $ver='v2.1.3' -Invoke-Webrequest "https://github.com/tboox/xmake/releases/download/$ver/xmake-$ver.exe" -OutFile "$pid-xmake-installer.exe" -ErrorAction Stop -Start-Process -FilePath "$pid-xmake-installer.exe" -ArgumentList '/S /D=C:\xmake' -Wait -ErrorAction Stop -Remove-Item "$pid-xmake-installer.exe" +Invoke-Webrequest "https://github.com/tboox/xmake/releases/download/$ver/xmake-$ver.exe" -OutFile "$outfile" -ErrorAction Stop +Start-Process -FilePath "$outfile" -ArgumentList '/S /D=C:\xmake' -Wait -ErrorAction Stop +Remove-Item "$outfile" $env:Path+=";C:\xmake" [Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User)+";C:\xmake",[System.EnvironmentVariableTarget]::User) xmake --version |
