-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Many installation scripts cannot be safely re-run, causing errors or inconsistent state when running bootstrap.sh multiple times.
Specific Issues
zsh/install.shreinstalls Oh My ZSH every time (will fail if already installed)python/install.sh:2tries to create plugins directory without checking if it existspython/install.sh:3creates symlink without checking if it already existshomebrew/preinstall.sh:16appends to.zprofileevery time (creating duplicates)macos/install.shsets dock apps without checking current state
Impact
- Can't safely re-run bootstrap after initial setup
- Makes incremental updates/fixes difficult
- Causes confusing error messages
- May create duplicate configurations
Recommended Solution
Make all scripts idempotent by adding checks before operations:
# Example: Check before creating directory
if [ ! -d "$(pyenv root)/plugins" ]; then
mkdir "$(pyenv root)/plugins"
fi
# Example: Check before creating symlink
if [ ! -L "$(pyenv root)/plugins/pyenv-install-latest" ]; then
ln -s ~/.dotfiles/python/pyenv-install-latest "$(pyenv root)/plugins/pyenv-install-latest"
fi
# Example: Check if line already exists before appending
if ! grep -q "brew shellenv" "$HOME/.zprofile"; then
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
fiSuccess Criteria
bootstrap.shcan be run multiple times without errors- Scripts detect existing installations and skip redundant operations
- Clear messaging about what's being skipped vs. installed
Priority
MEDIUM - Important for maintainability and user experience
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request