Skip to content

Commit c4507cc

Browse files
codeprakhar25claude
andcommitted
feat: install Python capture scripts from release tarball
Also adds next-steps messaging and PATH check on completion. Handles missing agentdiff-mcp gracefully for older builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent db02638 commit c4507cc

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

‎install.sh‎

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,30 @@ fi
123123
tar -xzf "${tmp}/${asset}" -C "$tmp"
124124
mkdir -p "$INSTALL_DIR"
125125
install -m 0755 "${tmp}/agentdiff" "${INSTALL_DIR}/agentdiff"
126-
install -m 0755 "${tmp}/agentdiff-mcp" "${INSTALL_DIR}/agentdiff-mcp"
126+
if [[ -f "${tmp}/agentdiff-mcp" ]]; then
127+
install -m 0755 "${tmp}/agentdiff-mcp" "${INSTALL_DIR}/agentdiff-mcp"
128+
fi
129+
130+
SCRIPTS_SRC="${tmp}/scripts"
131+
SCRIPTS_DST="${HOME}/.agentdiff/scripts"
132+
if [[ -d "$SCRIPTS_SRC" ]] && compgen -G "${SCRIPTS_SRC}/*.py" > /dev/null 2>&1; then
133+
mkdir -p "$SCRIPTS_DST"
134+
cp "${SCRIPTS_SRC}"/*.py "$SCRIPTS_DST/"
135+
echo "Capture scripts installed → ${SCRIPTS_DST}/"
136+
else
137+
echo "Note: capture scripts not bundled in this release."
138+
echo "Run 'agentdiff configure' to fetch them, or install from source."
139+
fi
127140

128-
echo "Installed:"
129-
echo " ${INSTALL_DIR}/agentdiff"
130-
echo " ${INSTALL_DIR}/agentdiff-mcp"
131141
echo
132-
echo "If needed, add to PATH:"
133-
echo " export PATH=\"${INSTALL_DIR}:\$PATH\""
142+
echo "Installed: ${INSTALL_DIR}/agentdiff $(${INSTALL_DIR}/agentdiff --version 2>/dev/null || true)"
143+
echo
144+
echo "Next steps:"
145+
echo " 1. cd your-git-repo"
146+
echo " 2. agentdiff configure — installs git hooks"
147+
echo " 3. agentdiff.site — install the GitHub App"
148+
echo
149+
if [[ ":${PATH}:" != *":${INSTALL_DIR}:"* ]]; then
150+
echo "Add to PATH if needed:"
151+
echo " export PATH=\"${INSTALL_DIR}:\$PATH\""
152+
fi

0 commit comments

Comments
 (0)