#!/bin/bash set -eux BASE_BASES="$(pwd)/bases" function get_base() { local name="$1" remote="$2" arch="$3" local dst="$BASE_BASES/$name/$arch" mkdir -p "$dst" rsync -yavP "$remote/$arch/base" "$dst/" } get_base x86_64 xrs:/space/ALT/Sisyphus x86_64 get_base x86_64 xrs:/space/ALT/Sisyphus noarch get_base riscv64 xrs:/riscv64/repo_depot/repo/sisyphus_riscv64/release/latest riscv64 get_base riscv64 xrs:/riscv64/repo_depot/repo/sisyphus_riscv64/release/latest noarch get_base mipsel xrs:/repo_depot/repo/sisyphus_mipsel/release/latest mipsel get_base mipsel xrs:/repo_depot/repo/sisyphus_mipsel/release/latest noarch cat > "$BASE_BASES/config.json" << EOF { "description": "Configuration for reports-secondary.office.basealt.ru", "repos": { "sisyphus": { "path": "$BASE_BASES/x86_64", "arch": ["x86_64", "noarch"], "bits": 64 }, "sisyphus_riscv64": { "path": "$BASE_BASES/riscv64", "arch": ["riscv64", "noarch"], "bits": 64 }, "sisyphus_mipsel": { "path": "$BASE_BASES/mipsel", "arch": ["mipsel", "noarch"], "bits": 32 } } } EOF python3 -im repos_cmp.repos "$BASE_BASES/config.json"