summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.ps17
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1
index 6f850204b..8d94e2d51 100755
--- a/scripts/get.ps1
+++ b/scripts/get.ps1
@@ -151,7 +151,12 @@ param (
$content = $content -replace "`n# >>> xmake >>>`n[\S\s]*?`n# <<< xmake <<<`n", ""
}
try {
- $appendcontent = (Invoke-Webrequest 'https://xmake.io/assets/scripts/pscompletions.text' -UseBasicParsing).Content
+ $url = if ($v -is [version]) {
+ "https://fastly.jsdelivr.net/gh/xmake-io/xmake@v$v/scripts/register-completions.ps1"
+ } else {
+ "https://fastly.jsdelivr.net/gh/xmake-io/xmake@$v/scripts/register-completions.ps1"
+ }
+ $appendcontent = (Invoke-Webrequest $url -UseBasicParsing).Content
} catch {
writeErrorTip 'Download failed!'
writeErrorTip 'Check your network or... the news of S3 break'