mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
16 lines
425 B
Bash
16 lines
425 B
Bash
#!/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."
|