aptrepo/update_repo

22 satır
646 B
Plaintext
Ham Kalıcı Bağlantı Normal Görünüm Geçmiş

2020-08-19 12:25:14 +02:00
#!/bin/bash
set -u
source ./CONFIG
mkdir -p repo/dists
mkdir -p repo/pool
2022-06-06 17:15:21 +02:00
mkdir -p repo/dists/impish/main/binary-amd64/
mkdir -p repo/dists/jammy/main/binary-amd64/
2020-08-19 12:25:14 +02:00
cd repo
2022-06-06 17:15:21 +02:00
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
2020-08-19 12:25:14 +02:00
gpg -a --yes --clearsign --output InRelease --local-user "$SIGNING_KEY_EMAIL" --detach-sign Release
2022-06-06 17:15:21 +02:00
cd ../../
done
cd ..
echo "Press key to upload"
read
2020-08-19 12:25:14 +02:00
rsync -aAXPv --delete repo/ "$TARGET_SERVER":"$TARGET_PATH"
ssh "$TARGET_SERVER" chown -R "$TARGET_OWNER" "$TARGET_PATH"