From 66041129fc47d275f8447ed0802ff61bc813eb60 Mon Sep 17 00:00:00 2001 From: Konstantin Kovshenin Date: Wed, 10 Nov 2021 18:13:01 +0300 Subject: [PATCH] Install: Use simple grep, should be suitable for macOS --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5fe0aa4..e732b0c 100755 --- a/install.sh +++ b/install.sh @@ -63,7 +63,7 @@ fi $SUDO mkdir $INSTALL_DIR || abort "Could not create directory ${INSTALL_DIR}. Are you root?" cd $INSTALL_DIR || abort "Could not enter directory ${INSTALL_DIR}. Make sure you have correct permissions." -TARGET_VERSION=$(curl --silent "https://api.github.com/repos/kovshenin/sail/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') +TARGET_VERSION=$(curl --silent "https://api.github.com/repos/kovshenin/sail/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') if [ -z $TARGET_VERSION ]; then TARGET_VERSION="main"