refactor: 添加base.sh并简化jq检查
This commit is contained in:
parent
24574b135a
commit
cdc84896c8
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user