diff --git a/setup.sh b/setup.sh index fb9817d..bc77d88 100644 --- a/setup.sh +++ b/setup.sh @@ -25,8 +25,8 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then script_count=0 - # Find all numbered scripts and run them in order - find "$DOTFILES_DIR/scripts" -name '[0-9][0-9]-*.sh' -type f | sort | while read -r script; do + # Find all numbered scripts and run them in order (no subshell) + while read -r script; do script_name=$(basename "$script") log_info "Running $script_name..." @@ -38,7 +38,7 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then fi ((script_count++)) - done + done < <(find "$DOTFILES_DIR/scripts" -name '[0-9][0-9]-*.sh' -type f | sort) if [ $script_count -eq 0 ]; then log_warning "No numbered scripts found in scripts/ directory"