refactor: make install.sh idempotent and add vim-plug #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background / 背景
The install.sh script was not idempotent, causing unnecessary re-installations and duplicate entries in configuration files. Also added vim-plug installation for better Vim plugin management.
install.shスクリプトが冪等ではなく、不要な再インストールや設定ファイルへの重複エントリが発生していました。また、Vimプラグイン管理改善のためvim-plugのインストールを追加しました。
Changes / 変更内容
Added existence checks before each installation to ensure idempotency
Implemented colored logging (INFO/SKIP) for better visibility
Added vim-plug installation for Vim plugin management
Fixed .zprofile duplicate entry issue by checking existing content
Added cleanup for Google Cloud CLI tar.gz file after installation
Added error handling with
set -efor early failure detection冪等性を確保するため各インストール前に存在確認を追加
視認性向上のため色付きログ(INFO/SKIP)を実装
Vimプラグイン管理用にvim-plugのインストールを追加
既存内容を確認して.zprofileへの重複エントリ問題を修正
Google Cloud CLIのtar.gzファイルをインストール後に削除
早期故障検出のため
set -eでエラーハンドリングを追加Impact scope / 影響範囲
This change affects all users running the install.sh script. The script can now be safely run multiple times without causing issues or duplicate installations.
この変更はinstall.shスクリプトを実行する全ユーザーに影響します。スクリプトは問題や重複インストールを起こすことなく、複数回安全に実行できるようになりました。
Testing / 動作確認
🤖 Generated with Claude Code