Files
linux-cloud-router/tests/remote/repo/publish.sh
T

27 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Regenerates the indexes of the test repository that nginx serves from /var/www/html: the
# packages of pool/main in dists/resolute/main for amd64 and arm64, and the Release file signed
# with root's key as InRelease.
set -e
cd /var/www/html
mkdir -p pool/main
for ARCH in amd64 arm64; do
mkdir -p "dists/resolute/main/binary-$ARCH"
apt-ftparchive packages pool/main > "dists/resolute/main/binary-$ARCH/Packages"
gzip -9 -k -f "dists/resolute/main/binary-$ARCH/Packages"
done
# The old Release and InRelease would be listed in the new Release.
rm -f dists/resolute/Release dists/resolute/InRelease
apt-ftparchive \
-o APT::FTPArchive::Release::Origin=linux-manager-test \
-o APT::FTPArchive::Release::Label=linux-manager-test \
-o APT::FTPArchive::Release::Suite=resolute \
-o APT::FTPArchive::Release::Codename=resolute \
-o "APT::FTPArchive::Release::Architectures=amd64 arm64" \
-o APT::FTPArchive::Release::Components=main \
release dists/resolute > /tmp/linux-manager-test-Release
mv /tmp/linux-manager-test-Release dists/resolute/Release
gpg --batch --yes --clear-sign -o dists/resolute/InRelease dists/resolute/Release