debrepo/scripts/genPkgRel.sh

21 lines
690 B
Bash
Raw Normal View History

2023-04-22 14:06:00 +02:00
#!/bin/sh
2023-05-26 12:47:10 +02:00
#DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_PATH=$(readlink -f "$0")
DIR=$(dirname "$SCRIPT_PATH")
LS="$(which ls)" # this prevents bugs when aliasing ls to tools like exa
REPODIR="$1"
ARCHS="$($LS -l $REPODIR/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-05-19 19:53:27 +02:00
cd $REPODIR/apt-repo/
2023-04-29 11:10:21 +02:00
for ARCH in $ARCHS; do
2023-05-10 13:52:03 +02:00
dpkg-scanpackages --multiversion --arch $ARCH "pool/" > "dists/stable/main/binary-$ARCH/Packages"
2023-04-29 11:10:21 +02:00
# compress Packages file
2023-05-10 13:52:03 +02:00
cat "dists/stable/main/binary-$ARCH/Packages" | gzip -9 > "dists/stable/main/binary-$ARCH/Packages.gz"
2023-04-29 11:10:21 +02:00
done
2023-04-22 14:06:00 +02:00
# generate Release file
2023-05-19 19:53:27 +02:00
cd "dists/stable/"
$DIR/generate-release.sh > "Release"
2023-04-22 14:06:00 +02:00