Skip to content

Commit

Permalink
🐛 修复 shell 变量名 panel 拼写错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreo authored and Oreo committed Dec 3, 2021
1 parent 2f35470 commit aeb45a6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ck_bilibili_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ check_jq_installed_status
check_java_installed_status

# shellcheck disable=SC2154
if [ "${pannel}" == "qinglong" ]; then
if [ "${panel}" == "qinglong" ]; then
bili_path="/ql/scripts/bilibili"
conf_file="/ql/config/java_conf.json"
elif [ "${pannel}" == "elecv2p" ]; then
elif [ "${panel}" == "elecv2p" ]; then
bili_path="/usr/local/app/script/Shell/checkinpanel/bilibili"
conf_file="/usr/local/app/script/Lists/java_conf.json"
fi
Expand Down
21 changes: 11 additions & 10 deletions utils_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ IS_DISPLAY_CONTEXT=1
# shellcheck disable=SC2034
check_env() {
if [ -f "${V2P_FILE}" ]; then
pannel="elecv2p"
panel="elecv2p"
elif [ -f "${QL_FILE}" ]; then
pannel="qinglong"
panel="qinglong"
else
CMD="$(grep -i pretty_name /etc/os-release 2>/dev/null | cut -d \" -f2)
$(hostnamectl 2>/dev/null | grep -i system | cut -d : -f2)
Expand Down Expand Up @@ -55,14 +55,15 @@ check_env() {
source_config() {
check_env
if [ "${ENV_PATH}" ]; then
. "$ENV_PATH"
elif [ "${pannel}" = "elecv2p" ]; then
. "/usr/local/app/script/Lists/.env"
elif [ "${pannel}" = "qinglong" ]; then
. "/ql/config/.env"
ENV_FILE=$ENV_PATH
elif [ "${panel}" = "elecv2p" ]; then
ENV_FILE="/usr/local/app/script/Lists/.env"
elif [ "${panel}" = "qinglong" ]; then
ENV_FILE="/ql/config/.env"
else
. env
ENV_FILE="./env"
fi
. "${ENV_FILE}" || printf "%s 不存在,请检查,若配置过环境变量的可以忽略。" "${ENV_FILE}"
# 是否显示上下文 默认是
if [ "${DISPLAY_CONTEXT}" -eq 0 ]; then
IS_DISPLAY_CONTEXT=0
Expand All @@ -83,7 +84,7 @@ check_jq_installed_status() {
if [ -z "$(command -v jq)" ]; then
printf "jq 依赖没有安装,开始安装..."
check_root
if [ "${pannel}" ]; then
if [ "${panel}" ]; then
apk add --no-cache jq
elif [ "${system}" = "centos" ]; then
yum update && yum install jq -y
Expand All @@ -105,7 +106,7 @@ check_java_installed_status() {
if [ -z "$(command -v java)" ]; then
printf "Java 依赖没有安装,开始安装..."
check_root
if [ "${pannel}" ]; then
if [ "${panel}" ]; then
apk add --no-cache openjdk8
fi
if [ -z "$(command -v java)" ]; then
Expand Down
2 changes: 1 addition & 1 deletion utils_ver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import requests

__version__ = "20211203-4-011"
__version__ = "20211203-4-021"
ONLINE_VERSION = ""
ver_re = re.compile("__version__ = .(\\d+-\\d+-...).")

Expand Down

0 comments on commit aeb45a6

Please sign in to comment.