Update install.sh

This commit is contained in:
星光-k
2025-01-13 15:23:19 +08:00
committed by GitHub
parent 8d40fcd1b4
commit 1be53da061

View File

@@ -14,6 +14,8 @@ USE_CN_MIRROR=false
DEBUG=false
# 检查是否使用中国git仓库
USE_CN_GIT=false
# 检查是否安装sugar-wifi-conf
USE_PI_SUGAR_WIFI_CONF=false
# 解析命令行参数
while [ "$#" -gt 0 ]; do
@@ -27,6 +29,9 @@ while [ "$#" -gt 0 ]; do
--gitcn)
USE_CN_GIT=true
;;
--pi-sugar-wifi-conf)
USE_PI_SUGAR_WIFI_CONF=true
;;
--debug)
DEBUG=true
;;
@@ -251,6 +256,17 @@ setup_service() {
fi
}
# 安装pip包函数
install_pip_packages() {
if [ "$USE_PI_SUGAR_WIFI_CONF" = true ]; then
echo "正在安装sugar-wifi-conf"
if ! curl $PI_SUGAR_WIFI_CONF_URL | sudo bash; then
echo "sugar-wifi-conf安装失败" >&2
echo "如需要请手动运行curl $PI_SUGAR_WIFI_CONF_URL | sudo bash" >&2
exit 1
fi
}
# 主逻辑
# 检测是否是Debian系统
if [ -f /etc/debian_version ]; then