Skip to content

script をリファクタリング&macOS 標準の Bash 3.2 で動く形にする - #52

Merged
Ryoga-exe merged 4 commits into
mainfrom
refactor/script
Jun 17, 2026
Merged

Ryoga-exe merged 4 commits into
mainfrom
refactor/script

Conversation

@Ryoga-exe

Copy link
Copy Markdown
Member

何かあればお願いします

@Ryoga-exe
Ryoga-exe requested review from Till0196 and oka4shi June 17, 2026 11:44
@Ryoga-exe Ryoga-exe self-assigned this Jun 17, 2026
@Ryoga-exe Ryoga-exe changed the title script をリファクタリング script をリファクタリング&macOS 標準の Bash 3.2 で動く形にする Jun 17, 2026
@Ryoga-exe
Ryoga-exe requested review from Till0196 and oka4shi June 17, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bash スクリプト群を共通関数化してリファクタリングし、macOS 標準の Bash 3.2 でも動作する構成に寄せた PR です(Bash 4+ 依存の連想配列・mapfile 等を排除)。

Changes:

  • scripts/lib.sh を追加し、色定義・trim・fonts.list パース・小文字化を共通化
  • list.sh / install.sh / check.sh を Bash 3.2 互換(非連想配列)な実装へ置換
  • README から Bash 4 系必須の記述を削除

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/list.sh fonts.list 読み取りとインストール済みフォント照合を Bash 3.2 向けに簡素化
scripts/lib.sh 共通ユーティリティ関数(trim / read_font_entries / lowercase)を新規追加
scripts/install.sh 共通 lib を利用しつつ、stdin からのフォント取得→DL/展開の流れに整理
scripts/check.sh 共通 lib を利用しつつ、stdin からの不足フォント表示をカウント方式に整理
README.md Bash 4+ 必須表記を削除し、macOS 標準 Bash でも使える前提に更新

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/lib.sh Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Ryoga-exe
Ryoga-exe merged commit 2432207 into main Jun 17, 2026
3 checks passed
@Ryoga-exe
Ryoga-exe deleted the refactor/script branch June 17, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants