aptrepo/update_repo

15 rader
515 B
Plaintext
Normal vy Historik

2020-08-19 12:25:14 +02:00
#!/bin/bash
set -u
source ./CONFIG
mkdir -p repo/dists
mkdir -p repo/pool
mkdir -p repo/dists/default/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
gpg -a --yes --clearsign --output InRelease --local-user "$SIGNING_KEY_EMAIL" --detach-sign Release
cd ../../../
rsync -aAXPv --delete repo/ "$TARGET_SERVER":"$TARGET_PATH"
ssh "$TARGET_SERVER" chown -R "$TARGET_OWNER" "$TARGET_PATH"