summaryrefslogtreecommitdiff
path: root/scripts/diffcheck.sh
diff options
context:
space:
mode:
authorkallewoof <kalle.alm@gmail.com>2023-03-09 11:57:21 +0900
committerGitHub <noreply@github.com>2023-03-09 11:57:21 +0900
commitebea569f193577af8be51a48f0838fab38add0a9 (patch)
tree00765ce15cc5bba8d17d007306d81decc0d88523 /scripts/diffcheck.sh
parent4e4db8ba123aa8e9cba8cc4d2f700b9724cb8963 (diff)
replace travis with Github Actions (#1432)
replace travis with Github Actions
Diffstat (limited to 'scripts/diffcheck.sh')
-rwxr-xr-xscripts/diffcheck.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/diffcheck.sh b/scripts/diffcheck.sh
new file mode 100755
index 0000000..4e4c459
--- /dev/null
+++ b/scripts/diffcheck.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/after.diff || true
+if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null; then
+ diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/before.diff || true
+ newdiff=$(diff -s /tmp/before.diff /tmp/after.diff -u | grep '^+')
+ if [ -n "$newdiff" ]; then
+ echo "$newdiff"
+ exit 1
+ fi
+else
+ echo 'Cannot build previous commit table for comparison'
+fi