Imported from prdlk/dotfiles master (efdd827). Drops the niri, Hyprland/Omarchy, macOS, and Blume docs-site layers; docs/ is plain Markdown.
17 lines
425 B
Bash
Executable File
17 lines
425 B
Bash
Executable File
#!/bin/sh
|
|
# Copy all AGENTS.md files to a target directory while preserving structure.
|
|
out_dir=$1
|
|
|
|
if [ -z "$out_dir" ]; then
|
|
echo "Error: Output directory required." >&2
|
|
echo "Usage: extract_agents <absolute_or_relative_output_path>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$out_dir"
|
|
|
|
# Find and copy preserving relative paths
|
|
fd -t f -g "AGENTS.md" -x cp --parents "{}" "$out_dir"
|
|
|
|
echo "Extraction complete. Check $out_dir."
|