23 lines
722 B
PowerShell
23 lines
722 B
PowerShell
|
|
# hooks/sync-doc-associations.ps1
|
||
|
|
# Wrapper for sync_doc_associations.py
|
||
|
|
# This script appends change reminders to associated .md files.
|
||
|
|
# It only appends to standard sections; it never overwrites existing content.
|
||
|
|
|
||
|
|
$ErrorActionPreference = "Stop"
|
||
|
|
|
||
|
|
$scriptPath = $MyInvocation.MyCommand.Path
|
||
|
|
if (-not [System.IO.Path]::IsPathRooted($scriptPath)) {
|
||
|
|
$scriptPath = Join-Path (Get-Location) $scriptPath
|
||
|
|
}
|
||
|
|
$scriptPath = [System.IO.Path]::GetFullPath($scriptPath)
|
||
|
|
$scriptDir = Split-Path -Parent $scriptPath
|
||
|
|
$pythonScript = Join-Path $scriptDir "sync_doc_associations.py"
|
||
|
|
|
||
|
|
if (-not (Test-Path $pythonScript)) {
|
||
|
|
Write-Error "Python script not found: $pythonScript"
|
||
|
|
exit 1
|
||
|
|
}
|
||
|
|
|
||
|
|
python "$pythonScript"
|
||
|
|
exit $LASTEXITCODE
|