From a222512d9fc78b72009f6c8794f2f6096c847367 Mon Sep 17 00:00:00 2001 From: blylei Date: Tue, 18 Apr 2023 23:59:01 +0800 Subject: [PATCH] init --- scripts/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 3ff04a2..7eb762a 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -32,8 +32,8 @@ prepare_dir(){ } get_latest(){ - latestURL=$apiURL"/releases/latest" - version=$(curl "$latestURL" | grep "tag_name" | awk -F":" '{print #2}') + local latestURL=$apiURL"/releases/latest" + local version=$(curl -sX GET "$latestURL" | awk '/tag_name/{print $4;exit}' FS='[""]') echo "$version" reture 0 }