diff --git a/.githooks/pre-commit b/.githooks/pre-commit index ddad515..169814b 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -9,6 +9,6 @@ git diff --cached --name-status | grep -E -i "^(A|M).*\.(md)$" | while read a b; (grep -E "^---$" $b > /dev/null) && (cat $b | sed "/---.*/,/---.*/s/^lastmod:.*$/lastmod: $(date -u "+%Y-%m-%dT%H:%M:%S%z")/" > tmp) (grep -E "^\+\+\+$" $b > /dev/null) && (cat $b | sed "/+++.*/,/+++.*/s/^lastmod.*$/lastmod = '$(date -u "+%Y-%m-%dT%H:%M:%S%z")'/" > tmp) mv tmp $b - git add $b + git add -p $b done