Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ copy_directories() {
# Find directories matching the pattern
# Use -path for patterns with slashes (e.g., vendor/bundle), -name for basenames
# Note: case inside $() inside heredocs breaks Bash 3.2, so compute first
# Use -maxdepth 1 for simple basenames to avoid scanning entire repo (e.g., node_modules)
local find_results
case "$pattern" in
*/*) find_results=$(find . -type d -path "./$pattern" 2>/dev/null) ;;
*) find_results=$(find . -type d -name "$pattern" 2>/dev/null) ;;
*) find_results=$(find . -maxdepth 1 -type d -name "$pattern" 2>/dev/null) ;;
Comment thread
helizaga marked this conversation as resolved.
Outdated
esac
Comment thread
helizaga marked this conversation as resolved.

while IFS= read -r dir_path; do
Expand Down