#!/bin/bash # git post-merge / post-checkout hook — 自动重建硬链接 # git 操作(merge/checkout/rebase)会替换文件、破坏硬链接,钩子自动修复 REPO="/home/hmo/MoFin" if [ -x "$REPO/deploy/profile-scripts/sync_profile_scripts.sh" ]; then bash "$REPO/deploy/profile-scripts/sync_profile_scripts.sh" >/dev/null 2>&1 echo "$(date '+%F %T') auto-synced by git $1 hook" >> "$REPO/gateway/logs/link_sync.log" fi exit 0