diff --git a/build.sh b/build.sh index a01940cd..2b3ea457 100755 --- a/build.sh +++ b/build.sh @@ -1467,9 +1467,18 @@ EOF mkdir -p "${MOUNT_POINT}/home/clawdie" "${MOUNT_POINT}/etc/profile.d" "${MOUNT_POINT}/etc/skel" # Install the canonical npm-global profile snippet (shared with agent-jail-bootstrap.sh). + # The snippet lives in colibri; resolve its repo the same way every other + # colibri consumer here does so COLIBRI_REPO overrides are honored. + resolve_colibri_paths + _npm_profile_src="${_resolved_colibri_repo}/packaging/freebsd/clawdie-npm-profile.sh" + if [ ! -f "${_npm_profile_src}" ]; then + echo "ERROR: shared npm profile snippet missing: ${_npm_profile_src}" + echo " It ships in colibri packaging/freebsd/. Set COLIBRI_REPO=/path/to/colibri." + exit 1 + fi { printf 'NPM_PREFIX="/opt/clawdie/npm-global"\n' - cat "${SCRIPT_DIR}/../colibri/packaging/freebsd/clawdie-npm-profile.sh" + cat "${_npm_profile_src}" } > "${MOUNT_POINT}/etc/profile.d/clawdie-npm.sh" chmod 0644 "${MOUNT_POINT}/etc/profile.d/clawdie-npm.sh"