mirror of
https://github.com/kxgx/2.13-Ink-screen-clock.git
synced 2026-03-29 09:29:44 +08:00
Update install.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user