fix: improve script discovery logic in setup.sh for better clarity
This commit is contained in:
9
setup.sh
9
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user