summaryrefslogtreecommitdiff
path: root/tools/checksql.sh
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-07 17:33:07 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-07 17:33:07 -0300
commit662279e8b2cb79a03864f84fdf799f0489fdfc7b (patch)
treee7104bc31f901d16c8597cae26aa31ccb20364ab /tools/checksql.sh
parent174d11705a13bd780dbb5c908f786fc65a6c2f9c (diff)
downloadhercules-662279e8b2cb79a03864f84fdf799f0489fdfc7b.tar.gz
hercules-662279e8b2cb79a03864f84fdf799f0489fdfc7b.tar.bz2
hercules-662279e8b2cb79a03864f84fdf799f0489fdfc7b.tar.xz
hercules-662279e8b2cb79a03864f84fdf799f0489fdfc7b.zip
Partial upgrade to v2020.01.12
Diffstat (limited to 'tools/checksql.sh')
-rwxr-xr-xtools/checksql.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/checksql.sh b/tools/checksql.sh
new file mode 100755
index 000000000..f7fb23700
--- /dev/null
+++ b/tools/checksql.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function checkdir {
+ for sql in $1/*.sql
+ do
+ echo "checking ${sql}"
+ php -d memory_limit=4G ./tools/php-sqllint/bin/php-sqllint "${sql}" || exit 1
+ done
+}
+
+checkdir "sql-files"
+checkdir "sql-files/upgrades"
+checkdir "sql-files/tools"