From 496eb641e6e4ef9df312ce70bb4b36eca18759cc Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sat, 8 Feb 2025 18:12:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84jq=E5=AE=89=E8=A3=85=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E5=B9=B6=E4=BD=BF=E7=94=A8=E5=A4=96=E9=83=A8=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/init.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/bin/init.sh b/bin/init.sh index bda2008..d6b0659 100644 --- a/bin/init.sh +++ b/bin/init.sh @@ -1,20 +1,11 @@ #!/bin/bash -# 检查 jq 是否安装 -if ! command -v jq &> /dev/null; then - echo "安装jq命令" - # 如果是Ubuntu系统 - if [ -f /etc/lsb-release ]; then - sudo apt-get update - sudo apt-get install -y jq - fi - # 如果是CentOS系统 - if [ -f /etc/redhat-release ]; then - sudo yum install -y jq - fi -fi script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径 +source "$script_dir/utils/package_manager.sh" + +# 检查jq是否安装 +check_jq # 生成uui, 写入到config.json文件 bash $script_dir/update_uuid.sh