debrepo/scripts/genPkgRel.sh

18 lines
594 B
Bash
Raw Normal View History

2023-04-22 14:06:00 +02:00
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
2023-04-29 11:10:21 +02:00
LS="$(which ls)"
ARCHS="$($LS -l apt-repo/dists/stable/main/ | awk '{print $9}' | awk NF | awk -F - '{print $2}')"
2023-04-22 14:06:00 +02:00
# generate Packages file
2023-04-29 11:10:21 +02:00
for ARCH in $ARCHS; do
echo $ARCH
dpkg-scanpackages --multiversion --arch $ARCH "./apt-repo/pool/" > "./apt-repo/dists/stable/main/binary-$ARCH/Packages"
# compress Packages file
cat "./apt-repo/dists/stable/main/binary-$ARCH/Packages" | gzip -9 > "./apt-repo/dists/stable/main/binary-$ARCH/Packages.gz"
done
2023-04-22 14:06:00 +02:00
# generate Release file
cd "./apt-repo/dists/stable/"
$DIR/generate-release.sh > "Release"
2023-04-22 14:06:00 +02:00