File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
set -eu
3
3
4
+ # Copied from arch() in ci/lib.sh.
5
+ detect_arch () {
6
+ case " $( uname -m) " in
7
+ aarch64)
8
+ echo arm64
9
+ ;;
10
+ x86_64 | amd64)
11
+ echo amd64
12
+ ;;
13
+ * )
14
+ # This will cause the download to fail, but is intentional
15
+ uname -m
16
+ ;;
17
+ esac
18
+ }
19
+
20
+ ARCH=" ${NPM_CONFIG_ARCH:- $(detect_arch)} "
21
+
4
22
main () {
5
23
# Grabs the major version of node from $npm_config_user_agent which looks like
6
24
# yarn/1.21.1 npm/? node/v14.2.0 darwin x64
@@ -25,7 +43,7 @@ main() {
25
43
esac
26
44
27
45
OS=" $( uname | tr ' [:upper:]' ' [:lower:]' ) "
28
- if curl -fsSL " https://storage.googleapis. com/coder- cloud-releases/ agent/latest/$OS /cloud-agent" -o ./lib/coder-cloud-agent; then
46
+ if curl -fsSL " https://github. com/cdr/ cloud-agent/releases/ latest/download /cloud-agent- $OS - $ARCH " -o ./lib/coder-cloud-agent; then
29
47
chmod +x ./lib/coder-cloud-agent
30
48
else
31
49
echo " Failed to download cloud agent; --link will not work"
You can’t perform that action at this time.
0 commit comments