From dbb6bed08d4cd4cf96a8db6e1b102cf6b4bae586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=85=89-k?= <36470587+kxgx@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:33:28 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20install.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index eb7d0d4..e03c9b5 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -16,9 +16,11 @@ DEBUG=false # 解析命令行参数 while [ "$#" -gt 0 ]; do case "$1" in + --zh) + DEFAULT_LANG="zh_CN.UTF-8" # 当使用 --zh 参数时,设置默认语言为中文 + ;; --cn) USE_CN_MIRROR=true - DEFAULT_LANG="zh_CN.UTF-8" # 当使用 --cn 参数时,设置默认语言为中文 ;; --debug) DEBUG=true @@ -120,12 +122,12 @@ install_pip_packages() { # 复制服务文件并设置为开机启动 setup_service() { if [ "$DEBUG" = true ]; then - echo "正在设置墨水屏时钟服务..." + echo "正在设置墨水屏时钟服务..." fi cd ~ -git clone $INK_SCREEN_CLOCK_REPO_URL + git clone $INK_SCREEN_CLOCK_REPO_URL if [ $? -eq 0 ]; then - # 假设服务文件在仓库的 service 文件夹下 + # 假设服务文件在仓库的 bin 文件夹下 SERVICE_PATH="raspi_e-paper.service" SERVICE_FILE_PATH="$HOME/2.13-Ink-screen-clock/bin/$SERVICE_PATH" if [ -f "$SERVICE_FILE_PATH" ]; then