From eb3d11895e5530e277c5fc36ca6a81e0cd003968 Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 6 Jun 2022 17:15:21 +0200 Subject: [PATCH] update_repo: Support multiple distros --- update_repo | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/update_repo b/update_repo index beeb1d2..f62d481 100755 --- a/update_repo +++ b/update_repo @@ -3,12 +3,19 @@ set -u source ./CONFIG mkdir -p repo/dists mkdir -p repo/pool -mkdir -p repo/dists/default/main/binary-amd64/ +mkdir -p repo/dists/impish/main/binary-amd64/ +mkdir -p repo/dists/jammy/main/binary-amd64/ cd repo -dpkg-scanpackages -a amd64 pool > ./dists/default/main/binary-amd64/Packages -cd dists/default/ -apt-ftparchive -c ../../../repo.conf release . > Release + +for distro in $(ls dists) ; do +dpkg-scanpackages -a amd64 pool/$distro > ./dists/$distro/main/binary-amd64/Packages +cd dists/$distro +apt-ftparchive -c ../../../repo.$distro.conf release . > Release gpg -a --yes --clearsign --output InRelease --local-user "$SIGNING_KEY_EMAIL" --detach-sign Release -cd ../../../ +cd ../../ +done +cd .. +echo "Press key to upload" +read rsync -aAXPv --delete repo/ "$TARGET_SERVER":"$TARGET_PATH" ssh "$TARGET_SERVER" chown -R "$TARGET_OWNER" "$TARGET_PATH"