initial commit

This commit is contained in:
2020-08-19 12:25:14 +02:00
commit 131be5e113
12 changed files with 114 additions and 0 deletions

14
update_repo Executable file
View File

@ -0,0 +1,14 @@
#!/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"