mirror of https://github.com/garrytan/gstack.git
Merge 9791c18004 into a3259400a3
This commit is contained in:
commit
0f999c30de
24
setup
24
setup
|
|
@ -569,14 +569,22 @@ link_claude_skill_dirs() {
|
||||||
# Validate target isn't a symlink before creating the link
|
# Validate target isn't a symlink before creating the link
|
||||||
if [ -L "$target/SKILL.md" ]; then rm "$target/SKILL.md"; fi
|
if [ -L "$target/SKILL.md" ]; then rm "$target/SKILL.md"; fi
|
||||||
_link_or_copy "$gstack_dir/$dir_name/SKILL.md" "$target/SKILL.md"
|
_link_or_copy "$gstack_dir/$dir_name/SKILL.md" "$target/SKILL.md"
|
||||||
# Link the sections/ subdir for carved skills (v2 plan T9). The prefixed
|
# Link EVERY sibling aux entry next to SKILL.md, not just sections/. A skill's SKILL.md reads its
|
||||||
# Claude skill dir otherwise holds only SKILL.md, so a runtime
|
# aux files by a path relative to its own dir (e.g. /review's "Read .claude/skills/review/
|
||||||
# "Read sections/<name>.md" 404s. Route through _link_or_copy so Windows
|
# checklist.md", plus specialists/, greptile-triage.md, design-checklist.md; or a carved skill's
|
||||||
# gets a fresh copy (and re-copies on every ./setup, refreshing staleness).
|
# "Read sections/<name>.md"). The target dir otherwise holds only SKILL.md, so those reads 404 —
|
||||||
if [ -d "$gstack_dir/$dir_name/sections" ]; then
|
# on Windows especially, where _link_or_copy makes SKILL.md a real COPY whose base dir is $target,
|
||||||
if [ -e "$target/sections" ] || [ -L "$target/sections" ]; then rm -rf "$target/sections"; fi
|
# not the gstack source. Route each aux entry through _link_or_copy (symlink on Unix, fresh copy on
|
||||||
_link_or_copy "$gstack_dir/$dir_name/sections" "$target/sections"
|
# Windows that re-syncs on every ./setup). SKILL.md itself and node_modules are skipped.
|
||||||
fi
|
for _aux in "$gstack_dir/$dir_name"/*; do
|
||||||
|
[ -e "$_aux" ] || continue
|
||||||
|
case "$(basename "$_aux")" in
|
||||||
|
SKILL.md|node_modules) continue ;;
|
||||||
|
esac
|
||||||
|
_aux_dst="$target/$(basename "$_aux")"
|
||||||
|
if [ -e "$_aux_dst" ] || [ -L "$_aux_dst" ]; then rm -rf "$_aux_dst"; fi
|
||||||
|
_link_or_copy "$_aux" "$_aux_dst"
|
||||||
|
done
|
||||||
linked+=("$link_name")
|
linked+=("$link_name")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue