File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- # Print every $HOME-relative path managed by the stow packages, derived from
3- # packages/ itself so the list can never drift from reality.
2+ # Print every $HOME-relative path managed by the HOME stow packages, derived
3+ # from packages/ itself so the list can never drift from reality. The harness
4+ # packages (claude, pi) are excluded — they stow into the profiles and ~/.pi
5+ # via harness-link, never into $HOME. The package set comes from the
6+ # Makefile's HOME_PACKAGES so the two can't diverge.
47# Mapping mirrors stow --dotfiles: a leading "dot-" on any path component -> ".".
58set -euo pipefail
6- cd " $( dirname " ${BASH_SOURCE[0]} " ) /../packages"
7- find . -mindepth 2 \( -type f -o -type l \) \
8- | sed -E ' s#^\./[^/]+/##' \
9+ repo_root=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
10+ home_packages=" $( sed -n ' s/^HOME_PACKAGES := //p' " $repo_root /Makefile" ) "
11+ [ -n " $home_packages " ] || { echo " managed-targets: HOME_PACKAGES not found in Makefile" >&2 ; exit 1; }
12+ cd " $repo_root /packages"
13+ # shellcheck disable=SC2086
14+ find $home_packages -mindepth 1 \( -type f -o -type l \) \
15+ | sed -E ' s#^[^/]+/##' \
916 | sed -E ' s#(^|/)dot-#\1.#g' \
1017 | sort -u
You can’t perform that action at this time.
0 commit comments