index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-03 14:34:19 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-03 14:34:19 +0200 |
commit | 05f9e7441da092c9353c8bd4a050aab9868b2e22 (patch) | |
tree | 5ab65ca252401fb7844ad26bebb0206bc5fede48 /lib | |
parent | e7165b896d38518068b91d7aaac52cb16bbbe59c (diff) |
-rwxr-xr-x | lib/mysql-functions | 27 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index df9cf77..b925b2e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -746,30 +746,35 @@ mysql_sanity_check() { temp_dir=$(mktemp -d 'tmp.mysql-functions.mysql_sanity_check.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${temp_dir}"' EXIT - for dir in $(ls_master_mirror 'i686'); do - ls_master_mirror "i686/${dir}" | \ - sed -n ' - s/\.pkg\.tar\.xz$// - T - s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/ - s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/ - s|^|'"${dir}"'/| - p - ' + # shellcheck disable=SC2041 + for arch in 'i686'; do + for dir in $(ls_master_mirror "${arch}"); do + ls_master_mirror "${arch}/${dir}" | \ + sed -n ' + s/\.pkg\.tar\.xz$// + T + s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/ + s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/ + s|^|'"${arch}"'/'"${dir}"'/| + p + ' + done done | \ sort > \ "${temp_dir}/master-mirror-listing" { - printf 'SELECT `repositories`.`name`,`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architectures`.`name`' + printf 'SELECT `r_a`.`name`,`repositories`.`name`,`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architectures`.`name`' printf ' FROM `binary_packages`' mysql_join_binary_packages_architectures mysql_join_binary_packages_repositories + mysql_join_repositories_architectures '' 'r_a' printf ' WHERE `repositories`.`is_on_master_mirror`' } | \ mysql_run_query | \ sed ' s,\t,/, + s,\t,/, s,\t,-, s,\t,:, s,\t,-, |