GeezerVison is showing github.com — commit and push · Rots/opencode@d3b2763
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +7-1Lines changed: 7 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 |
|
7 | 7 | ## Installation |
8 | 8 |
|
| 9 | +### Curl |
| 10 | + |
| 11 | +``` |
| 12 | +curl -fsSL https://opencode.ai/install | bash |
| 13 | +``` |
| 14 | + |
9 | 15 | ### NPM |
10 | 16 |
|
11 | 17 | ``` |
@@ -21,7 +27,7 @@ yarn global add opencode-ai@latest |
21 | 27 | brew install sst/tap/opencode |
22 | 28 | ``` |
23 | 29 |
|
24 | | -### Aur |
| 30 | +### AUR |
25 | 31 |
|
26 | 32 | ``` |
27 | 33 | paru -S opencode-bin |
|
Collapse file
Copy file name to clipboardExpand all lines: install +13-7Lines changed: 13 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,23 +12,28 @@ requested_version=${VERSION:-} |
12 | 12 |
|
13 | 13 | os=$(uname -s | tr '[:upper:]' '[:lower:]') |
14 | 14 | if [[ "$os" == "darwin" ]]; then |
15 | | - os="mac" |
| 15 | + os="darwin" |
16 | 16 | fi |
17 | 17 | arch=$(uname -m) |
18 | 18 |
|
19 | 19 | if [[ "$arch" == "aarch64" ]]; then |
20 | 20 | arch="arm64" |
| 21 | +elif [[ "$arch" == "x86_64" ]]; then |
| 22 | + arch="x64" |
21 | 23 | fi |
22 | 24 |
|
23 | | -filename="$APP-$os-$arch.tar.gz" |
| 25 | +filename="$APP-$os-$arch.zip" |
24 | 26 |
|
25 | 27 |
|
26 | 28 | case "$filename" in |
27 | 29 | *"-linux-"*) |
28 | | - [[ "$arch" == "x86_64" || "$arch" == "arm64" || "$arch" == "i386" ]] || exit 1 |
| 30 | + [[ "$arch" == "x64" || "$arch" == "arm64" ]] || exit 1 |
29 | 31 | ;; |
30 | | - *"-mac-"*) |
31 | | - [[ "$arch" == "x86_64" || "$arch" == "arm64" ]] || exit 1 |
| 32 | + *"-darwin-"*) |
| 33 | + [[ "$arch" == "x64" || "$arch" == "arm64" ]] || exit 1 |
| 34 | + ;; |
| 35 | + *"-windows-"*) |
| 36 | + [[ "$arch" == "x64" ]] || exit 1 |
32 | 37 | ;; |
33 | 38 | *) |
34 | 39 | echo "${RED}Unsupported OS/Arch: $os/$arch${NC}" |
@@ -88,8 +93,9 @@ check_version() { |
88 | 93 | download_and_install() { |
89 | 94 | print_message info "Downloading ${ORANGE}opencode ${GREEN}version: ${YELLOW}$specific_version ${GREEN}..." |
90 | 95 | mkdir -p opencodetmp && cd opencodetmp |
91 | | - curl -# -L $url | tar xz |
92 | | - mv opencode $INSTALL_DIR |
| 96 | + curl -# -L -o "$filename" "$url" |
| 97 | + unzip -q "$filename" |
| 98 | + mv opencode "$INSTALL_DIR" |
93 | 99 | cd .. && rm -rf opencodetmp |
94 | 100 | } |
95 | 101 |
|
|