From 14e32112267bddec1d40934b4a8f41834b753a64 Mon Sep 17 00:00:00 2001 From: Haruue Icymoon Date: Sun, 5 Nov 2023 16:17:06 +0800 Subject: [PATCH] fix(script): version check broken --- scripts/install_server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_server.sh b/scripts/install_server.sh index 170545f..3dae096 100644 --- a/scripts/install_server.sh +++ b/scripts/install_server.sh @@ -809,7 +809,7 @@ get_latest_version() { exit 11 fi - local _latest_version=$(grep 'lver' "$_tmpfile" | head -1 | grep -o '"v.*"') + local _latest_version=$(grep -oP '"lver":\s*\K"v.*?"' "$_tmpfile" | head -1) _latest_version=${_latest_version#'"'} _latest_version=${_latest_version%'"'}