From 6ee939fbdf942702a94abdc6ef31f43c17ac157b Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Thu, 19 Jan 2023 07:43:18 -0600 Subject: [PATCH] check for new or moved files --- wiki-tools/lint.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wiki-tools/lint.sh b/wiki-tools/lint.sh index eed266a1..805da453 100644 --- a/wiki-tools/lint.sh +++ b/wiki-tools/lint.sh @@ -9,9 +9,14 @@ if [ "$?" -gt 0 ]; then STATUS=1 fi -bash wiki-tools/brokenlinks.sh -s -if [ "$?" -gt 0 ]; then - STATUS=1 +if git diff --compact-summary HEAD~1 HEAD | grep -E "=>|\(new\)" >/dev/null; then + bash wiki-tools/brokenlinks.sh -s + if [ "$?" -gt 0 ]; then + STATUS=1 + fi +else + bash wiki-tools/brokenlinks.sh -s $CHANGED fi + return "$STATUS"