Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/sanity-check
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-19 19:18:32 +0100
committerErich Eckner <git@eckner.net>2018-02-19 19:18:32 +0100
commitdb88d4e5468084e37dbcf46361b04d22248e11fd (patch)
treeba7c60969dd6e6608d2f7424f8f0eea80eacfe12 /bin/sanity-check
parent426210589120997b4bf991636ea5a16acbb964ae (diff)
bin/sanity-check: go insane if mysql database is not sane
Diffstat (limited to 'bin/sanity-check')
-rwxr-xr-xbin/sanity-check22
1 files changed, 21 insertions, 1 deletions
diff --git a/bin/sanity-check b/bin/sanity-check
index 39a2d10..601a940 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -105,7 +105,7 @@ touch "${tmp_dir}/messages"
trap 'finish' EXIT
if [ $# -eq 0 ]; then
- set -- git-repositories build-list repos package-database state-files
+ set -- git-repositories build-list mysql repos package-database state-files
fi
while [ $# -gt 0 ]; do
@@ -385,6 +385,26 @@ while [ $# -gt 0 ]; do
;;
+ mysql)
+
+ [ ${silence} -gt 0 ] || \
+ printf 'checking mysql-sanity-check-file ...' >> \
+ "${tmp_dir}/messages"
+
+ if [ -s "${webserver_directory}/mysql-sanity.html" ]; then
+ if [ ${silence} -le 1 ]; then
+ printf '\nThere is something wrong with the database:\n'
+ cat "${webserver_directory}/mysql-sanity.html"
+ fi
+ i_am_insane
+ fi
+
+ [ ${silence} -gt 0 ] || \
+ echo ' passed.' >> \
+ "${tmp_dir}/messages"
+
+ ;;
+
*)
[ ${silence} -gt 1 ] || \