update_repo: Support multiple distros
Tento commit je obsažen v:
rodič
fa38977813
revize
eb3d11895e
17
update_repo
17
update_repo
@ -3,12 +3,19 @@ set -u
|
|||||||
source ./CONFIG
|
source ./CONFIG
|
||||||
mkdir -p repo/dists
|
mkdir -p repo/dists
|
||||||
mkdir -p repo/pool
|
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
|
cd repo
|
||||||
dpkg-scanpackages -a amd64 pool > ./dists/default/main/binary-amd64/Packages
|
|
||||||
cd dists/default/
|
for distro in $(ls dists) ; do
|
||||||
apt-ftparchive -c ../../../repo.conf release . > Release
|
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
|
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"
|
rsync -aAXPv --delete repo/ "$TARGET_SERVER":"$TARGET_PATH"
|
||||||
ssh "$TARGET_SERVER" chown -R "$TARGET_OWNER" "$TARGET_PATH"
|
ssh "$TARGET_SERVER" chown -R "$TARGET_OWNER" "$TARGET_PATH"
|
||||||
|
Načítá se…
Odkázat v novém úkolu
Zablokovat Uživatele