Fix: hardcode version 1.0.1 and fix extract path
Browse files- install.sh +2 -7
install.sh
CHANGED
|
@@ -182,12 +182,7 @@ else
|
|
| 182 |
|
| 183 |
if [ -z "$requested_version" ]; then
|
| 184 |
url="https://github.com/badman99dev/opencode-1/releases/download/v1.0.1/opencode-linux-x64.tar.gz"
|
| 185 |
-
specific_version=
|
| 186 |
-
|
| 187 |
-
if [[ $? -ne 0 || -z "$specific_version" ]]; then
|
| 188 |
-
echo -e "${RED}Failed to fetch version information${NC}"
|
| 189 |
-
exit 1
|
| 190 |
-
fi
|
| 191 |
else
|
| 192 |
# Strip leading 'v' if present
|
| 193 |
requested_version="${requested_version#v}"
|
|
@@ -336,11 +331,11 @@ download_and_install() {
|
|
| 336 |
|
| 337 |
if [ "$os" = "linux" ]; then
|
| 338 |
tar -xzf "$tmp_dir/$filename" -C "$tmp_dir"
|
|
|
|
| 339 |
else
|
| 340 |
unzip -q "$tmp_dir/$filename" -d "$tmp_dir"
|
| 341 |
fi
|
| 342 |
|
| 343 |
-
mv "$tmp_dir/opencode" "$INSTALL_DIR"
|
| 344 |
chmod 755 "${INSTALL_DIR}/opencode"
|
| 345 |
rm -rf "$tmp_dir"
|
| 346 |
}
|
|
|
|
| 182 |
|
| 183 |
if [ -z "$requested_version" ]; then
|
| 184 |
url="https://github.com/badman99dev/opencode-1/releases/download/v1.0.1/opencode-linux-x64.tar.gz"
|
| 185 |
+
specific_version="1.0.1"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
else
|
| 187 |
# Strip leading 'v' if present
|
| 188 |
requested_version="${requested_version#v}"
|
|
|
|
| 331 |
|
| 332 |
if [ "$os" = "linux" ]; then
|
| 333 |
tar -xzf "$tmp_dir/$filename" -C "$tmp_dir"
|
| 334 |
+
mv "$tmp_dir/opencode-linux-x64/opencode" "$INSTALL_DIR"
|
| 335 |
else
|
| 336 |
unzip -q "$tmp_dir/$filename" -d "$tmp_dir"
|
| 337 |
fi
|
| 338 |
|
|
|
|
| 339 |
chmod 755 "${INSTALL_DIR}/opencode"
|
| 340 |
rm -rf "$tmp_dir"
|
| 341 |
}
|