persona

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 2ae17b17bfab72338575b757fc40e3d940811324
parent 5f1bc0f49767e6e0e2cafefde13c9a48de965d6e
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Tue, 28 Apr 2026 07:23:52 +0900

"feat(setup): Add external configuration repository setup"
success to copy to clip

Diffstat:
Msetup.ps1 | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/setup.ps1 b/setup.ps1 @@ -158,7 +158,44 @@ try { catch { Write-Error "'shortcuts' フォルダのPATHへの追加に失敗しました: $_" } +# --- 既存のレジストリ・プロファイル処理の後に追記 --- +# 9. 外部設定リポジトリのセットアップ +try { + Write-Host "[9/x] 外部設定リポジトリをセットアップしています..." -ForegroundColor Cyan + + # gh (GitHub CLI) がインストールされているか確認 + if (-not (Get-Command gh -ErrorAction SilentlyContinue)) { + Write-Warning " gh CLIが見つかりません。Wingetでのインストールを先に完了させてください。" + } else { + $configRepos = @( + @{ Name = "zed-config"; Path = "$env:APPDATA\Zed" }, + @{ Name = "nushell-config"; Path = "$env:APPDATA\nushell" } + # 必要に応じて追加 + ) + + foreach ($repo in $configRepos) { + if (-not (Test-Path $repo.Path)) { + Write-Host " $($repo.Name) をクローンしています..." + # AppDataなどの深い階層へ直接クローン、またはシンボリックリンク + gh repo clone "your-github-id/$($repo.Name)" $repo.Path + + # 指定のブランチに切り替え + Push-Location $repo.Path + git switch windows + Pop-Location + Write-Host " $($repo.Name) (windows branch) のセットアップが完了しました。" + } else { + Write-Host " $($repo.Name) は既に存在します。スキップします。" -ForegroundColor Yellow + } + } + } +} +catch { + Write-Error "リポジトリのセットアップ中にエラーが発生しました: $_" +} + +# --- 最後に Explorer を再起動 --- Write-Host "------------------------------------------------------------" Write-Host "セットアップスクリプトが完了しました。" -ForegroundColor Green Write-Host "UI関連の変更を適用するためにExplorerを再起動します。" -ForegroundColor Yellow