mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-17 05:30:48 +08:00
🐛 更新脚本 自动检测 jq 工具依赖安装
🐛 修复令牌下移判断 Count 问题
This commit is contained in:
@@ -40,6 +40,33 @@ Install_certutil() {
|
||||
echo "certutil 工具已安装。"
|
||||
fi
|
||||
}
|
||||
Install_jq() {
|
||||
# Check if jq is already installed
|
||||
if command -v jq &>/dev/null; then
|
||||
echo "jq 工具已安装。"
|
||||
else
|
||||
echo "jq 用来解析版本更新。"
|
||||
# Check the package manager
|
||||
if command -v apt &>/dev/null; then
|
||||
# Using apt (Debian/Ubuntu)
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
elif command -v dnf &>/dev/null; then
|
||||
# Using dnf (Fedora)
|
||||
sudo dnf install -y jq
|
||||
elif command -v yum &>/dev/null; then
|
||||
# Using yum (CentOS/Red Hat)
|
||||
sudo yum install -y jq
|
||||
elif command -v pacman &>/dev/null; then
|
||||
# Using pacman (Arch Linux)
|
||||
sudo pacman -S jq
|
||||
else
|
||||
echo "请手动安装 jq 工具。"
|
||||
exit 1
|
||||
fi
|
||||
echo "请手动安装 jq 工具。"
|
||||
fi
|
||||
}
|
||||
#精简版系统可能没有该工具
|
||||
Install_zenity() {
|
||||
# 判断发行版类型
|
||||
@@ -266,6 +293,7 @@ exit" >"$base_path/$exec_name.sh"
|
||||
#先安装依赖;
|
||||
Install_certutil
|
||||
Install_zenity
|
||||
Install_jq
|
||||
#版本检查更新;
|
||||
Get_NewVer
|
||||
|
||||
|
||||
+1
-1
Submodule ref/WinAuth updated: 31e7e4a02f...e936bae0c9
+1
-1
@@ -563,7 +563,7 @@ public sealed partial class AuthenticatorHomePageViewModel : ViewModelBase
|
||||
{
|
||||
if (sender is not AuthenticatorItemModel authenticatorItemModel) return;
|
||||
var index = Auths.IndexOf(authenticatorItemModel);
|
||||
if (index == Auths.Count)
|
||||
if (index > Auths.Count)
|
||||
return;
|
||||
if (authenticatorItemModel.AuthData.ServerId != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user