initial commit

This commit is contained in:
2020-08-19 12:25:14 +02:00
當前提交 131be5e113
共有 12 個文件被更改,包括 114 次插入0 次删除

14
update_repo Executable 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"