mirror of
https://github.com/yyhuni/xingrin.git
synced 2026-01-31 11:46:16 +08:00
chore(install): Add banner display and update confirmation
- Add show_banner() function to display XingRin ASCII art logo - Call show_banner() before header in install.sh initialization - Add experimental feature warning in update.sh with user confirmation - Prompt user to confirm before proceeding with update operation - Suggest full reinstall via uninstall.sh and install.sh as alternative - Improve user experience with visual feedback and safety checks
This commit is contained in:
17
install.sh
17
install.sh
@@ -64,6 +64,22 @@ header() {
|
||||
echo -e "${BOLD}${BLUE}============================================================${RESET}"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# 显示横幅
|
||||
# ==============================================================================
|
||||
show_banner() {
|
||||
echo -e "${CYAN}"
|
||||
cat << 'EOF'
|
||||
__ __ _ ____ _
|
||||
\ \/ /(_)_ __ __ _| _ \(_)_ __
|
||||
\ / | | '_ \ / _` | |_) | | '_ \
|
||||
/ \ | | | | | (_| | _ <| | | | |
|
||||
/_/\_\|_|_| |_|\__, |_| \_\_|_| |_|
|
||||
|___/
|
||||
EOF
|
||||
echo -e "${RESET}"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# 权限检查
|
||||
# ==============================================================================
|
||||
@@ -96,6 +112,7 @@ else
|
||||
fi
|
||||
|
||||
# 显示标题
|
||||
show_banner
|
||||
header "XingRin 一键安装脚本 (Ubuntu)"
|
||||
info "当前用户: ${BOLD}$REAL_USER${RESET}"
|
||||
info "项目路径: ${BOLD}$ROOT_DIR${RESET}"
|
||||
|
||||
14
update.sh
14
update.sh
@@ -83,6 +83,20 @@ fi
|
||||
echo -e "${BOLD}${BLUE}╚════════════════════════════════════════╝${NC}"
|
||||
echo ""
|
||||
|
||||
# 测试性功能警告
|
||||
echo -e "${BOLD}${YELLOW}[!] 警告:此功能为测试性功能,可能会导致升级失败${NC}"
|
||||
echo -e "${YELLOW} 建议运行 ./uninstall.sh 后重新执行 ./install.sh 进行全新安装${NC}"
|
||||
echo ""
|
||||
echo -n -e "${YELLOW}是否继续更新?(y/N) ${NC}"
|
||||
read -r ans_continue
|
||||
ans_continue=${ans_continue:-N}
|
||||
|
||||
if [[ ! $ans_continue =~ ^[Yy]$ ]]; then
|
||||
echo -e "${CYAN}已取消更新。${NC}"
|
||||
exit 0
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo -e "${CYAN}[1/4]${NC} 停止服务..."
|
||||
./stop.sh 2>&1 | sed 's/^/ /'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user