summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOpportunity <[email protected]>2023-02-21 15:49:27 +0800
committerGitHub <[email protected]>2023-02-21 15:49:27 +0800
commite9ffa9a0ebef6c5db90b3c9a83cc3c3add449290 (patch)
tree82e3bed39182087cf8e421d61e51febbb2a45caf /scripts
parent013efd7a212d87f8c21b15aca4bbbfab04725302 (diff)
Update get.ps1
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'