From c9ab6bde77ece791da3ea749f5ba011dda2ee664 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Sun, 4 May 2025 21:35:06 +0800 Subject: [PATCH] =?UTF-8?q?doc=20readme:=20=E8=A3=9C=E4=B8=8ASynology?= =?UTF-8?q?=E7=9A=84=E5=AE=89=E8=A3=9D=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Readme.md b/Readme.md index 7861acb..2377da4 100644 --- a/Readme.md +++ b/Readme.md @@ -300,6 +300,42 @@ watchman shutdown-server watchman watch-del-all ``` +Synology內的安裝方式 +-------------------------------------------------------------------------------- + +因為Synology 預設使用的是 sh(通常是 BusyBox 版本),不是 GNU bash,會導致普通的方式會出錯。 + +### 1. 安裝指令 +``` +sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply --exclude=scripts chyuaner +``` + +出現選項時,選擇 unRoot Mode (因為Synology環境很難處理軟體安裝,乾脆直接用unRoot模式) + +### 2. 設定zsh為預設shell環境 +``` +cat << EOF > ~/.profile +if [[ -x /usr/local/bin/zsh ]]; then +export SHELL=/usr/local/bin/zsh +exec /usr/local/bin/zsh +fi +EOF +``` + +### 3. 手動安裝相關軟體 +因為Synology環境的限制,無法自動化執行腳本。 +請看 `.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl` 這份檔案,依照需求,手動複製執行需要的指令。 + +### 後續如有更新 +``` +chezmoi update --apply --exclude=scripts +``` + +若要手動看執行內容: +``` +chezmoi update --apply -v --dry-run +``` + 相關工具參考連結 -------------------------------------------------------------------------------- *