🛠️ Update various documentation, scripts, and configuration templates to enhance clarity, functionality, and maintainability across the project
This commit is contained in:
40
install/verify.sh
Normal file → Executable file
40
install/verify.sh
Normal file → Executable file
@@ -39,6 +39,30 @@ check_path() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_command() {
|
||||
local label="$1"
|
||||
local command_name="$2"
|
||||
|
||||
if command -v "$command_name" >/dev/null 2>&1; then
|
||||
printf '[ok] %s: %s\n' "$label" "$command_name"
|
||||
else
|
||||
printf '[missing] %s: %s\n' "$label" "$command_name" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_readable_file() {
|
||||
local label="$1"
|
||||
local path="$2"
|
||||
|
||||
if [[ -r "$path" ]]; then
|
||||
printf '[ok] %s: %s\n' "$label" "$path"
|
||||
else
|
||||
printf '[unreadable] %s: %s\n' "$label" "$path" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
if [[ "${1:-}" == "--quick" ]]; then
|
||||
quick="true"
|
||||
@@ -46,6 +70,11 @@ main() {
|
||||
|
||||
local vscode_user_dir
|
||||
vscode_user_dir="$(detect_vscode_user_dir)"
|
||||
local vscode_mcp_file="$vscode_user_dir/mcp.json"
|
||||
local copilot_cli_mcp_file="$copilot_home/mcp-config.json"
|
||||
local local_mcp_overrides_file="$canonical_home/.local/mcp.local.jsonc"
|
||||
local session_start_hook_file="$canonical_home/resources/hooks/session-audit.json"
|
||||
local session_start_hook_script="$canonical_home/resources/scripts/report-hook-event.sh"
|
||||
|
||||
check_path "repo root" "$repo_root"
|
||||
check_path "canonical home" "$canonical_home"
|
||||
@@ -53,11 +82,22 @@ main() {
|
||||
check_path "agents link" "$copilot_home/agents"
|
||||
check_path "instructions link" "$copilot_home/instructions"
|
||||
check_path "hooks link" "$copilot_home/hooks"
|
||||
check_path "session start hook" "$session_start_hook_file"
|
||||
check_path "session start hook script" "$session_start_hook_script"
|
||||
check_readable_file "session start hook script" "$session_start_hook_script"
|
||||
check_command "session start hook shell" "bash"
|
||||
check_path "prompts link" "$vscode_user_dir/prompts"
|
||||
check_path "VS Code MCP config" "$vscode_mcp_file"
|
||||
check_path "Copilot CLI MCP config" "$copilot_cli_mcp_file"
|
||||
check_path "local MCP overrides" "$local_mcp_overrides_file"
|
||||
|
||||
if [[ "$quick" != "true" ]]; then
|
||||
check_path "VS Code settings template" "$repo_root/config/vscode/settings.template.jsonc"
|
||||
check_path "CLI env template" "$repo_root/config/copilot-cli/env.example.sh"
|
||||
check_path "VS Code MCP template" "$repo_root/config/mcp/vscode.mcp.template.jsonc"
|
||||
check_path "Copilot CLI MCP template" "$repo_root/config/mcp/copilot-cli.mcp.template.jsonc"
|
||||
check_path "MCP local override example" "$repo_root/config/mcp/local-overrides.example.jsonc"
|
||||
check_path "Copilot CLI filesystem wrapper" "$repo_root/install/mcp/copilot-cli-filesystem-wrapper.mjs"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user