From ae6109a8acd9e981d69fe8a3a731e82b4e910b54 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 8 Jul 2018 12:34:54 +0200 Subject: bin/check-mirrors: use git repository of releng --- bin/check-mirrors | 5 ++++- conf/master.conf.example | 3 +++ lib/load-configuration | 13 +++++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/bin/check-mirrors b/bin/check-mirrors index 174ae50..49abf97 100755 --- a/bin/check-mirrors +++ b/bin/check-mirrors @@ -5,8 +5,11 @@ if [ $# -eq 0 ]; then + git -C "${releng_dir}" remote update + country_codes=$( - curl -Ss 'https://git.archlinux32.org/archlinux32/releng/raw/branch/master/flag-names' + git -C "${releng_dir}" archive master -- 'flag-names' | \ + tar -Ox ) tmp_file=$( diff --git a/conf/master.conf.example b/conf/master.conf.example index a3093e8..488f7ce 100755 --- a/conf/master.conf.example +++ b/conf/master.conf.example @@ -18,6 +18,9 @@ # root directory of the webserver #webserver_directory='/srv/http' +# directory of the releng git repository +#releng_directory="${work_dir}/repos/releng" + # directory to keep the build log files in #build_log_directory='/srv/http/build-logs' diff --git a/lib/load-configuration b/lib/load-configuration index 7a6a4f3..8c893fc 100755 --- a/lib/load-configuration +++ b/lib/load-configuration @@ -29,6 +29,8 @@ fi if [ "$(hostname)" = 'buildmaster.archlinux32.org' ]; then i_am_the_master=true + + releng_directory="${work_dir}/repos/releng" else i_am_the_master=false @@ -128,9 +130,16 @@ fi mkdir -p "${work_dir}" -for repo in ${repo_names}; do +for repo in ${repo_names} 'releng'; do - eval repo_path='"${repo_paths__'"${repo}"'}"' + if [ "${repo}" = 'releng' ]; then + if [ -z "${releng_directory}" ]; then + continue + fi + repo_path="${releng_directory}" + else + eval repo_path='"${repo_paths__'"${repo}"'}"' + fi mkdir -p "${repo_path%/*}" -- cgit v1.2.3-70-g09d2