-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Improve setup script for production readiness and best prac…
…tices - Modularized script into functions for better readability and maintainability. - Added logging functionality to track progress and actions taken during the script execution. - Ensured the script exits on errors using `set -eo pipefail` for robust error handling. - Externalized configuration values such as URLs to the top of the script. - Enhanced comments for better understanding of the script's purpose and functionality. - Separated setup logic for macOS and Ubuntu into distinct functions (`macos_setup` and `ubuntu_setup`). - Implemented user confirmation prompt for adding SSH key during Ubuntu setup. - Included functions for cleaning up old files and backing up existing configurations. - Maintained all original functionalities, including kubectl plugin installation and repository setup. - Ensured environment-specific setups (macOS and Ubuntu) are handled correctly. - Added default shell setup for ZSH on Ubuntu. - Updated `install` and `main` functions to handle installation flow and reinstallation prompts. Overall, these changes make the script more maintainable, readable, and ready for production environments.
- Loading branch information
Showing
1 changed file
with
99 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters