Skip to content

Commit

Permalink
refactor: using grep instead of jq
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushSehrawat authored May 6, 2023
1 parent 7f7eafd commit b0d974e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ check_sudo() {

echo -e "Installing brain..."

latest_version=$(curl -s https://api.github.com/repos/neobrains/brain/releases/latest | jq -r '.tag_name')
latest_version=$(curl -s https://api.github.com/repos/neobrains/brain/releases/latest | grep -o '"tag_name": "v[^"]*"' | grep -o 'v[^"]*' | cut -d '"' -f1)

if [ -x "$brain_bin" ]; then
if [[ "$(brain --version)" == *"$latest_version"* ]]; then
Expand Down

0 comments on commit b0d974e

Please sign in to comment.