难绷的typo

This commit is contained in:
Cookie987
2025-03-18 22:22:48 +08:00
parent 997c816dc1
commit 8c89c0b95e

View File

@@ -161,8 +161,8 @@ switch_branch() {
sed -i "s/^BRANCH=.*/BRANCH=${new_branch}/" /etc/maimbot_install.conf sed -i "s/^BRANCH=.*/BRANCH=${new_branch}/" /etc/maimbot_install.conf
BRANCH="${new_branch}" BRANCH="${new_branch}"
check_eula
systemctl restart ${SERVICE_NAME} systemctl restart ${SERVICE_NAME}
touch "${INSTALL_DIR}/repo/elua.confirmed"
whiptail --msgbox "✅ 已切换到分支 ${new_branch} 并重启服务!" 10 60 whiptail --msgbox "✅ 已切换到分支 ${new_branch} 并重启服务!" 10 60
} }
@@ -194,9 +194,9 @@ check_eula() {
current_md5_privacy=$(md5sum ${INSTALL_DIR}/repo/PRIVACY.md | awk '{print $1}') current_md5_privacy=$(md5sum ${INSTALL_DIR}/repo/PRIVACY.md | awk '{print $1}')
# 检查eula.confirmed文件是否存在 # 检查eula.confirmed文件是否存在
if [[ -f ${INSTALL_DIR}/repo/elua.confirmed ]]; then if [[ -f ${INSTALL_DIR}/repo/eula.confirmed ]]; then
# 如果存在则检查其中包含的md5与current_md5是否一致 # 如果存在则检查其中包含的md5与current_md5是否一致
confirmed_md5=$(cat ${INSTALL_DIR}/repo/elua.confirmed) confirmed_md5=$(cat ${INSTALL_DIR}/repo/eula.confirmed)
else else
confirmed_md5="" confirmed_md5=""
fi fi
@@ -213,7 +213,7 @@ check_eula() {
if [[ $current_md5 != $confirmed_md5 || $current_md5_privacy != $confirmed_md5_privacy ]]; then if [[ $current_md5 != $confirmed_md5 || $current_md5_privacy != $confirmed_md5_privacy ]]; then
whiptail --title "📜 使用协议更新" --yesno "检测到麦麦Bot EULA或隐私条款已更新。\nhttps://github.com/SengokuCola/MaiMBot/blob/main/EULA.md\nhttps://github.com/SengokuCola/MaiMBot/blob/main/PRIVACY.md\n\n您是否同意上述协议 \n\n " 12 70 whiptail --title "📜 使用协议更新" --yesno "检测到麦麦Bot EULA或隐私条款已更新。\nhttps://github.com/SengokuCola/MaiMBot/blob/main/EULA.md\nhttps://github.com/SengokuCola/MaiMBot/blob/main/PRIVACY.md\n\n您是否同意上述协议 \n\n " 12 70
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo $current_md5 > ${INSTALL_DIR}/repo/elua.confirmed echo $current_md5 > ${INSTALL_DIR}/repo/eula.confirmed
echo $current_md5_privacy > ${INSTALL_DIR}/repo/privacy.confirmed echo $current_md5_privacy > ${INSTALL_DIR}/repo/privacy.confirmed
else else
exit 1 exit 1
@@ -231,7 +231,7 @@ run_installation() {
fi fi
# 协议确认 # 协议确认
if ! (whiptail --title " [1/6] 使用协议" --yes-button "我同意" --no-button "我拒绝" --yesno "使用麦麦Bot及此脚本前请先阅读ELUA协议及隐私协议\nhttps://github.com/SengokuCola/MaiMBot/blob/main/EULA.md\nhttps://github.com/SengokuCola/MaiMBot/blob/main/PRIVACY.md\n\n您是否同意上述协议" 12 70); then if ! (whiptail --title " [1/6] 使用协议" --yes-button "我同意" --no-button "我拒绝" --yesno "使用麦麦Bot及此脚本前请先阅读EULA协议及隐私协议\nhttps://github.com/SengokuCola/MaiMBot/blob/main/EULA.md\nhttps://github.com/SengokuCola/MaiMBot/blob/main/PRIVACY.md\n\n您是否同意上述协议" 12 70); then
exit 1 exit 1
fi fi
@@ -398,7 +398,7 @@ run_installation() {
# 首先计算当前隐私条款文件的哈希值 # 首先计算当前隐私条款文件的哈希值
current_md5_privacy=$(md5sum repo/PRIVACY.md | awk '{print $1}') current_md5_privacy=$(md5sum repo/PRIVACY.md | awk '{print $1}')
echo $current_md5 > repo/elua.confirmed echo $current_md5 > repo/eula.confirmed
echo $current_md5_privacy > repo/privacy.confirmed echo $current_md5_privacy > repo/privacy.confirmed
echo -e "${GREEN}创建系统服务...${RESET}" echo -e "${GREEN}创建系统服务...${RESET}"