Skip to content

Commit 3601809

Browse files
maxritterclaude
andcommitted
fix: refactor install script into modular architecture for maintainability
Refactor monolithic 706-line install.sh into well-organized modules following software engineering best practices: Modular Architecture (scripts/lib/): - ui.sh (36 lines) - Color codes and print functions - utils.sh (49 lines) - Common utilities and jq installation - download.sh (48 lines) - GitHub API and file download functions - files.sh (109 lines) - Claude CodePro file management - dependencies.sh (191 lines) - All dependency installations (NVM, Node.js, Python, etc.) - shell.sh (100 lines) - Shell configuration and alias management Main install.sh (343 lines): - Bootstrap functionality to download lib modules for curl | bash support - Configuration constants - Source all modules - Main installation orchestration Benefits: - 51% reduction in main script size (706 → 343 lines) - Single Responsibility Principle - each module has clear purpose - DRY principle applied throughout - Improved maintainability and testability - Better code organization and readability - Flexible NVM detection for dev containers and local environments - All syntax checks pass No Breaking Changes: - Maintains curl | bash installation method - All existing functionality preserved - Same user experience 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 679f619 commit 3601809

File tree

8 files changed

+621
-414
lines changed

8 files changed

+621
-414
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ downloads/
1515
eggs/
1616
.eggs/
1717
lib/
18+
!scripts/lib/
1819
lib64/
1920
parts/
2021
sdist/

0 commit comments

Comments
 (0)