From cdc84896c86f79dd44b1ed7c40b0e3089f146d5e Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sat, 8 Feb 2025 22:43:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B7=BB=E5=8A=A0base.sh=E5=B9=B6?= =?UTF-8?q?=E7=AE=80=E5=8C=96jq=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/update_password.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/update_password.sh b/bin/update_password.sh index 512b38e..c30d56f 100644 --- a/bin/update_password.sh +++ b/bin/update_password.sh @@ -1,16 +1,14 @@ #!/bin/bash -# 检查是否安装了jq命令 -if ! command -v jq &> /dev/null; then - echo "Error: jq command not found. Please install jq first." - exit 1 -fi - # 当前脚本所在目录的绝对路径 script_dir="$(dirname "$(realpath "$0")")" # 加载jq_util.sh脚本 source $script_dir/utils/jq_util.sh +source $script_dir/utils/base.sh + +# 检查jq是否安装 +check_jq # 函数生成随机密码 gen_random_pass() {