22 lignes
646 B
Bash
Fichiers exécutables
22 lignes
646 B
Bash
Fichiers exécutables
#!/bin/bash
|
|
set -u
|
|
source ./CONFIG
|
|
mkdir -p repo/dists
|
|
mkdir -p repo/pool
|
|
mkdir -p repo/dists/impish/main/binary-amd64/
|
|
mkdir -p repo/dists/jammy/main/binary-amd64/
|
|
cd repo
|
|
|
|
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 ../../
|
|
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"
|