diff --git a/setup.sh b/setup.sh index 874773a..414bc68 100644 --- a/setup.sh +++ b/setup.sh @@ -25,8 +25,11 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then # Look for numbered scripts and run them in order script_count=0 - for script in "$DOTFILES_DIR"/scripts/[0-9][0-9]-*.sh; do - echo "DEBUG: Found script: $script" + + # Get list of numbered scripts, sorted + script_files=$(find "$DOTFILES_DIR/scripts" -name '[0-9][0-9]-*.sh' -type f | sort) + + for script in $script_files; do if [ -f "$script" ]; then script_name=$(basename "$script") log_info "Running $script_name..." @@ -39,8 +42,6 @@ if [ -d "$DOTFILES_DIR/scripts" ]; then fi ((script_count++)) - else - echo "DEBUG: Not a file: $script" fi done