mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 10:44:21 +01:00
fix: install script didnt use -e flag (#2009)
This commit is contained in:
6
install
6
install
@@ -36,7 +36,7 @@ case "$filename" in
|
|||||||
[[ "$arch" == "x64" ]] || exit 1
|
[[ "$arch" == "x64" ]] || exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "${RED}Unsupported OS/Arch: $os/$arch${NC}"
|
echo -e "${RED}Unsupported OS/Arch: $os/$arch${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -49,7 +49,7 @@ if [ -z "$requested_version" ]; then
|
|||||||
specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/latest | awk -F'"' '/"tag_name": "/ {gsub(/^v/, "", $4); print $4}')
|
specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/latest | awk -F'"' '/"tag_name": "/ {gsub(/^v/, "", $4); print $4}')
|
||||||
|
|
||||||
if [[ $? -ne 0 || -z "$specific_version" ]]; then
|
if [[ $? -ne 0 || -z "$specific_version" ]]; then
|
||||||
echo "${RED}Failed to fetch version information${NC}"
|
echo -e "${RED}Failed to fetch version information${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -96,7 +96,7 @@ download_and_install() {
|
|||||||
curl -# -L -o "$filename" "$url"
|
curl -# -L -o "$filename" "$url"
|
||||||
unzip -q "$filename"
|
unzip -q "$filename"
|
||||||
mv opencode "$INSTALL_DIR"
|
mv opencode "$INSTALL_DIR"
|
||||||
cd .. && rm -rf opencodetmp
|
cd .. && rm -rf opencodetmp
|
||||||
}
|
}
|
||||||
|
|
||||||
check_version
|
check_version
|
||||||
|
|||||||
Reference in New Issue
Block a user