Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-29 09:46:35 +0100
committerErich Eckner <git@eckner.net>2019-10-29 09:46:35 +0100
commitcd7293bc960879370e013ef1a67274541776bc88 (patch)
tree0e74e6b7737e23ff3c05cca22d6dfceacf78f429
parentf015c817f3e7c300b8eb83546b05a8d2e4993af5 (diff)
bin/check-mirrors: correctly cast bits
-rwxr-xr-xbin/check-mirrors12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/check-mirrors b/bin/check-mirrors
index 3ea1c04..5dc8cfe 100755
--- a/bin/check-mirrors
+++ b/bin/check-mirrors
@@ -64,13 +64,21 @@ if [ $# -eq 0 ]; then
'country_code' \
'last_sync' \
'start' \
- 'stop' \
+ 'stop'
+ printf '@%s,' \
'isos' \
'ipv4' \
'ipv6' \
'active' | \
sed 's/,$//'
- printf ');\n'
+ printf ') set '
+ printf '`%s`=CAST(`%s` AS SIGNED),' \
+ 'isos' 'isos' \
+ 'ipv4' 'ipv4' \
+ 'ipv6' 'ipv6' \
+ 'active' 'active' | \
+ sed 's/,$//'
+ printf ';\n'
} | \
mysql_run_query